| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api
Contents
- Eras
- Type tags
- Cryptographic key interface
- Payment addresses
- Stake addresses
- Currency values
- Blocks
- Building transactions
- Building transactions
- Transaction bodies
- Transaction Ids
- Transaction inputs
- Transaction outputs
- Other transaction body types
- Building vs viewing transactions
- Era-dependent transaction body features
- Feature availability functions
- Fee calculation
- Minimum required UTxO calculation
- Script execution units
- Transaction balance
- Building transactions with automated fees and balancing
- Signing transactions
- Transaction metadata
- Certificates
- Stake pool off-chain metadata
- Scripts
- Serialisation
- Errors
- Node interaction
- Node operation
- Genesis file
- Special transactions
- Protocol parameter updates
Description
This module provides a library interface for interacting with Cardano as a user of the system.
It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types.
In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley.
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data AlonzoEra
- data CardanoEra era where
- class HasTypeProxy era ⇒ IsCardanoEra era where
- cardanoEra ∷ CardanoEra era
- data AnyCardanoEra where
- AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra
- anyCardanoEra ∷ CardanoEra era → AnyCardanoEra
- data InAnyCardanoEra thing where
- InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing
- data ShelleyBasedEra era where
- class IsCardanoEra era ⇒ IsShelleyBasedEra era where
- data InAnyShelleyBasedEra thing where
- InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing
- data CardanoEraStyle era where
- LegacyByronEra ∷ CardanoEraStyle ByronEra
- ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era
- cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era
- shelleyBasedToCardanoEra ∷ ShelleyBasedEra era → CardanoEra era
- type Byron = ByronEra
- type Shelley = ShelleyEra
- type Allegra = AllegraEra
- type Mary = MaryEra
- class HasTypeProxy t where
- data AsType t
- proxyToAsType ∷ Proxy t → AsType t
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole
- data family VerificationKey keyrole ∷ Type
- getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole
- verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole
- castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB
- castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB
- generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole)
- deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole
- deterministicSigningKeySeedSize ∷ Key keyrole ⇒ AsType keyrole → Word
- data family Hash keyrole ∷ Type
- castHash ∷ CastHash roleA roleB ⇒ Hash roleA → Hash roleB
- data Address addrtype
- data ByronAddr
- data ShelleyAddr
- data NetworkId
- makeByronAddress ∷ NetworkId → VerificationKey ByronKey → Address ByronAddr
- data ByronKey
- data ByronKeyLegacy
- makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr
- data PaymentCredential
- newtype StakeAddressPointer = StakeAddressPointer {
- unStakeAddressPointer ∷ Ptr
- data StakeAddressReference
- data PaymentKey
- data PaymentExtendedKey
- data AddressAny
- lexPlausibleAddressString ∷ Parser Text
- parseAddressAny ∷ Parser AddressAny
- data AddressInEra era where
- AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era
- isKeyAddress ∷ AddressInEra era → Bool
- data AddressTypeInEra addrtype era where
- byronAddressInEra ∷ Address ByronAddr → AddressInEra era
- shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era
- anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era
- anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era)
- toAddressAny ∷ Address addr → AddressAny
- makeByronAddressInEra ∷ NetworkId → VerificationKey ByronKey → AddressInEra era
- makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era
- data StakeAddress
- data StakeCredential
- makeStakeAddress ∷ NetworkId → StakeCredential → StakeAddress
- data StakeKey
- data StakeExtendedKey
- newtype Lovelace = Lovelace Integer
- newtype Quantity = Quantity Integer
- newtype PolicyId = PolicyId ScriptHash
- scriptPolicyId ∷ Script lang → PolicyId
- newtype AssetName = AssetName ByteString
- data AssetId
- data Value
- parseValue ∷ Parser Value
- selectAsset ∷ Value → AssetId → Quantity
- valueFromList ∷ [(AssetId, Quantity)] → Value
- valueToList ∷ Value → [(AssetId, Quantity)]
- filterValue ∷ (AssetId → Bool) → Value → Value
- negateValue ∷ Value → Value
- newtype ValueNestedRep = ValueNestedRep [ValueNestedBundle]
- data ValueNestedBundle
- valueToNestedRep ∷ Value → ValueNestedRep
- valueFromNestedRep ∷ ValueNestedRep → Value
- renderValue ∷ Value → Text
- renderValuePretty ∷ Value → Text
- quantityToLovelace ∷ Quantity → Lovelace
- lovelaceToQuantity ∷ Lovelace → Quantity
- selectLovelace ∷ Value → Lovelace
- lovelaceToValue ∷ Lovelace → Value
- valueToLovelace ∷ Value → Maybe Lovelace
- data Block era where
- pattern Block ∷ BlockHeader → [Tx era] → Block era
- data BlockHeader = BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo
- getBlockHeader ∷ ∀ era. Block era → BlockHeader
- data ChainPoint
- newtype EpochNo = EpochNo {}
- data ChainTip
- newtype BlockNo = BlockNo {}
- chainTipToChainPoint ∷ ChainTip → ChainPoint
- data TxBody era where
- pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era
- makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era)
- data TxBodyContent build era = TxBodyContent {
- txIns ∷ TxIns build era
- txInsCollateral ∷ TxInsCollateral era
- txOuts ∷ [TxOut CtxTx era]
- txTotalCollateral ∷ TxTotalCollateral era
- txReturnCollateral ∷ TxReturnCollateral CtxTx era
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txExtraKeyWits ∷ TxExtraKeyWitnesses era
- txProtocolParams ∷ BuildTxWith build (Maybe ProtocolParameters)
- txWithdrawals ∷ TxWithdrawals build era
- txCertificates ∷ TxCertificates build era
- txUpdateProposal ∷ TxUpdateProposal era
- txMintValue ∷ TxMintValue build era
- txScriptValidity ∷ TxScriptValidity era
- data TxBodyError
- data TxBodyScriptData era where
- TxBodyNoScriptData ∷ TxBodyScriptData era
- TxBodyScriptData ∷ ScriptDataSupportedInEra era → TxDats (ShelleyLedgerEra era) → Redeemers (ShelleyLedgerEra era) → TxBodyScriptData era
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ ∀ era. TxBody era → TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- renderTxIn ∷ TxIn → Text
- data CtxTx
- data CtxUTxO
- data TxOut ctx era = TxOut (AddressInEra era) (TxOutValue era) (TxOutDatum ctx era) (ReferenceScript era)
- data TxOutValue era where
- TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- txOutValueToLovelace ∷ TxOutValue era → Lovelace
- txOutValueToValue ∷ TxOutValue era → Value
- lovelaceToTxOutValue ∷ IsCardanoEra era ⇒ Lovelace → TxOutValue era
- data TxOutDatum ctx era where
- TxOutDatumNone ∷ TxOutDatum ctx era
- TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatum ctx era
- TxOutDatumInline ∷ InlineDatumSupportedInEra era → ScriptData → TxOutDatum ctx era
- pattern TxOutDatumInTx ∷ ScriptDataSupportedInEra era → ScriptData → TxOutDatum CtxTx era
- parseHash ∷ SerialiseAsRawBytes (Hash a) ⇒ AsType (Hash a) → Parser (Hash a)
- data TxInsCollateral era where
- TxInsCollateralNone ∷ TxInsCollateral era
- TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era
- data TxTotalCollateral era where
- data TxReturnCollateral ctx era where
- TxReturnCollateralNone ∷ TxReturnCollateral ctx era
- TxReturnCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → TxOut ctx era → TxReturnCollateral ctx era
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- newtype SlotNo = SlotNo {}
- newtype EpochSlots = EpochSlots {}
- data TxMetadataInEra era where
- TxMetadataNone ∷ TxMetadataInEra era
- TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era
- data TxAuxScripts era where
- TxAuxScriptsNone ∷ TxAuxScripts era
- TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era
- data TxExtraKeyWitnesses era where
- data TxWithdrawals build era where
- TxWithdrawalsNone ∷ TxWithdrawals build era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era
- data TxCertificates build era where
- TxCertificatesNone ∷ TxCertificates build era
- TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era
- data TxUpdateProposal era where
- data TxMintValue build era where
- TxMintNone ∷ TxMintValue build era
- TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era
- data BuildTxWith build a where
- ViewTx ∷ BuildTxWith ViewTx a
- BuildTxWith ∷ a → BuildTxWith BuildTx a
- data BuildTx
- data ViewTx
- data CollateralSupportedInEra era where
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- ValidityUpperBoundInShelleyEra ∷ ValidityUpperBoundSupportedInEra ShelleyEra
- ValidityUpperBoundInAllegraEra ∷ ValidityUpperBoundSupportedInEra AllegraEra
- ValidityUpperBoundInMaryEra ∷ ValidityUpperBoundSupportedInEra MaryEra
- ValidityUpperBoundInAlonzoEra ∷ ValidityUpperBoundSupportedInEra AlonzoEra
- ValidityUpperBoundInBabbageEra ∷ ValidityUpperBoundSupportedInEra BabbageEra
- data ValidityNoUpperBoundSupportedInEra era where
- ValidityNoUpperBoundInByronEra ∷ ValidityNoUpperBoundSupportedInEra ByronEra
- ValidityNoUpperBoundInAllegraEra ∷ ValidityNoUpperBoundSupportedInEra AllegraEra
- ValidityNoUpperBoundInMaryEra ∷ ValidityNoUpperBoundSupportedInEra MaryEra
- ValidityNoUpperBoundInAlonzoEra ∷ ValidityNoUpperBoundSupportedInEra AlonzoEra
- ValidityNoUpperBoundInBabbageEra ∷ ValidityNoUpperBoundSupportedInEra BabbageEra
- data ValidityLowerBoundSupportedInEra era where
- data TxMetadataSupportedInEra era where
- data AuxScriptsSupportedInEra era where
- data TxExtraKeyWitnessesSupportedInEra era where
- data ScriptDataSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- WithdrawalsInShelleyEra ∷ WithdrawalsSupportedInEra ShelleyEra
- WithdrawalsInAllegraEra ∷ WithdrawalsSupportedInEra AllegraEra
- WithdrawalsInMaryEra ∷ WithdrawalsSupportedInEra MaryEra
- WithdrawalsInAlonzoEra ∷ WithdrawalsSupportedInEra AlonzoEra
- WithdrawalsInBabbageEra ∷ WithdrawalsSupportedInEra BabbageEra
- data CertificatesSupportedInEra era where
- CertificatesInShelleyEra ∷ CertificatesSupportedInEra ShelleyEra
- CertificatesInAllegraEra ∷ CertificatesSupportedInEra AllegraEra
- CertificatesInMaryEra ∷ CertificatesSupportedInEra MaryEra
- CertificatesInAlonzoEra ∷ CertificatesSupportedInEra AlonzoEra
- CertificatesInBabbageEra ∷ CertificatesSupportedInEra BabbageEra
- data UpdateProposalSupportedInEra era where
- UpdateProposalInShelleyEra ∷ UpdateProposalSupportedInEra ShelleyEra
- UpdateProposalInAllegraEra ∷ UpdateProposalSupportedInEra AllegraEra
- UpdateProposalInMaryEra ∷ UpdateProposalSupportedInEra MaryEra
- UpdateProposalInAlonzoEra ∷ UpdateProposalSupportedInEra AlonzoEra
- UpdateProposalInBabbageEra ∷ UpdateProposalSupportedInEra BabbageEra
- data InlineDatumSupportedInEra era where
- collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era)
- multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era)
- extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era)
- withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ CardanoEra era → Maybe (UpdateProposalSupportedInEra era)
- scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era)
- totalAndReturnCollateralSupportedInEra ∷ CardanoEra era → Maybe (TxTotalAndReturnCollateralSupportedInEra era)
- transactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ Natural → Natural → Tx era → Lovelace
- estimateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ NetworkId → Natural → Natural → Tx era → Int → Int → Int → Int → Lovelace
- evaluateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → TxBody era → Word → Word → Lovelace
- estimateTransactionKeyWitnessCount ∷ TxBodyContent BuildTx era → Word
- calculateMinimumUTxO ∷ ShelleyBasedEra era → TxOut CtxTx era → ProtocolParameters → Either MinimumUTxOError Value
- data MinimumUTxOError
- evaluateTransactionExecutionUnits ∷ ∀ era mode. EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → UTxO era → TxBody era → Either TransactionValidityError (Map ScriptWitnessIndex (Either ScriptExecutionError ExecutionUnits))
- data ScriptExecutionError
- = ScriptErrorMissingTxIn TxIn
- | ScriptErrorTxInWithoutDatum TxIn
- | ScriptErrorWrongDatum (Hash ScriptData)
- | ScriptErrorEvaluationFailed EvaluationError [Text]
- | ScriptErrorExecutionUnitsOverflow
- | ScriptErrorNotPlutusWitnessedTxIn ScriptWitnessIndex
- | ScriptErrorMissingScript RdmrPtr
- | ScriptErrorMissingCostModel Language
- data TransactionValidityError
- = TransactionValidityIntervalError PastHorizonException
- | TransactionValidityBasicFailure (BasicFailure StandardCrypto)
- evaluateTransactionBalance ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → Set PoolId → UTxO era → TxBody era → TxOutValue era
- makeTransactionBodyAutoBalance ∷ ∀ era mode. IsShelleyBasedEra era ⇒ EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → Set PoolId → UTxO era → TxBodyContent BuildTx era → AddressInEra era → Maybe Word → Either TxBodyErrorAutoBalance (BalancedTxBody era)
- data BalancedTxBody era = BalancedTxBody (TxBody era) (TxOut CtxTx era) Lovelace
- data TxBodyErrorAutoBalance
- = TxBodyError TxBodyError
- | TxBodyScriptExecutionError [(ScriptWitnessIndex, ScriptExecutionError)]
- | TxBodyScriptBadScriptValidity
- | TxBodyErrorAssetBalanceWrong Value
- | TxBodyErrorAdaBalanceNegative Lovelace
- | TxBodyErrorAdaBalanceTooSmall TxOutInAnyEra Lovelace Lovelace
- | TxBodyErrorByronEraNotSupported
- | TxBodyErrorMissingParamMinUTxO
- | TxBodyErrorMissingParamCostPerWord
- | TxBodyErrorValidityInterval TransactionValidityError
- | TxBodyErrorMinUTxONotMet TxOutInAnyEra Lovelace
- | TxBodyErrorMinUTxOMissingPParams MinimumUTxOError
- | TxBodyErrorNonAdaAssetsUnbalanced Value
- data TxScriptValidity era where
- data ScriptValidity
- data TxScriptValiditySupportedInEra era where
- scriptValidityToTxScriptValidity ∷ ShelleyBasedEra era → ScriptValidity → TxScriptValidity era
- txScriptValiditySupportedInShelleyBasedEra ∷ ShelleyBasedEra era → Maybe (TxScriptValiditySupportedInEra era)
- txScriptValiditySupportedInCardanoEra ∷ CardanoEra era → Maybe (TxScriptValiditySupportedInEra era)
- data Tx era where
- pattern Tx ∷ TxBody era → [KeyWitness era] → Tx era
- getTxBody ∷ ∀ era. Tx era → TxBody era
- getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era]
- signByronTransaction ∷ NetworkId → TxBody ByronEra → [SigningKey ByronKey] → Tx ByronEra
- signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era
- makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era
- data KeyWitness era
- makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra
- data ShelleyWitnessSigningKey
- = WitnessPaymentKey (SigningKey PaymentKey)
- | WitnessPaymentExtendedKey (SigningKey PaymentExtendedKey)
- | WitnessStakeKey (SigningKey StakeKey)
- | WitnessStakeExtendedKey (SigningKey StakeExtendedKey)
- | WitnessStakePoolKey (SigningKey StakePoolKey)
- | WitnessGenesisKey (SigningKey GenesisKey)
- | WitnessGenesisExtendedKey (SigningKey GenesisExtendedKey)
- | WitnessGenesisDelegateKey (SigningKey GenesisDelegateKey)
- | WitnessGenesisDelegateExtendedKey (SigningKey GenesisDelegateExtendedKey)
- | WitnessGenesisUTxOKey (SigningKey GenesisUTxOKey)
- makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era
- makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era
- newtype TxMetadata = TxMetadata (Map Word64 TxMetadataValue)
- data TxMetadataValue
- makeTransactionMetadata ∷ Map Word64 TxMetadataValue → TxMetadata
- validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] ()
- data TxMetadataRangeError
- data TxMetadataJsonSchema
- metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata
- metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value
- metadataValueToJsonNoSchema ∷ TxMetadataValue → Value
- data TxMetadataJsonError
- data TxMetadataJsonSchemaError
- = TxMetadataJsonNullNotAllowed
- | TxMetadataJsonBoolNotAllowed
- | TxMetadataJsonNumberNotInteger !Double
- | TxMetadataJsonNotObject !Value
- | TxMetadataJsonBadObject ![(Text, Value)]
- | TxMetadataJsonBadMapPair !Value
- | TxMetadataJsonTypeMismatch !Text !Value
- data Certificate
- = StakeAddressRegistrationCertificate StakeCredential
- | StakeAddressDeregistrationCertificate StakeCredential
- | StakeAddressDelegationCertificate StakeCredential PoolId
- | StakePoolRegistrationCertificate StakePoolParameters
- | StakePoolRetirementCertificate PoolId EpochNo
- | GenesisKeyDelegationCertificate (Hash GenesisKey) (Hash GenesisDelegateKey) (Hash VrfKey)
- | MIRCertificate MIRPot MIRTarget
- makeStakeAddressRegistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDeregistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDelegationCertificate ∷ StakeCredential → PoolId → Certificate
- makeStakePoolRegistrationCertificate ∷ StakePoolParameters → Certificate
- makeStakePoolRetirementCertificate ∷ PoolId → EpochNo → Certificate
- data StakePoolParameters
- data StakePoolRelay
- data StakePoolMetadataReference
- data StakePoolMetadata
- validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata)
- data StakePoolMetadataValidationError
- data SimpleScriptV1
- data SimpleScriptV2
- data PlutusScriptV1
- data PlutusScriptV2
- data ScriptLanguage lang where
- SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang
- PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang
- data SimpleScriptVersion lang where
- data PlutusScriptVersion lang where
- data AnyScriptLanguage where
- data AnyPlutusScriptVersion where
- class HasTypeProxy lang ⇒ IsScriptLanguage lang where
- scriptLanguage ∷ ScriptLanguage lang
- class IsScriptLanguage lang ⇒ IsSimpleScriptLanguage lang where
- data Script lang where
- SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang
- PlutusScript ∷ !(PlutusScriptVersion lang) → !(PlutusScript lang) → Script lang
- data ScriptInAnyLang where
- ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang
- toScriptInAnyLang ∷ Script lang → ScriptInAnyLang
- data ScriptInEra era where
- ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era
- toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era)
- eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era
- data WitCtxTxIn
- data WitCtxMint
- data WitCtxStake
- data WitCtx witctx where
- data ScriptWitness witctx era where
- SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era
- PlutusScriptWitness ∷ ScriptLanguageInEra lang era → PlutusScriptVersion lang → PlutusScript lang → ScriptDatum witctx → ScriptRedeemer → ExecutionUnits → ScriptWitness witctx era
- data Witness witctx era where
- KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era
- ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era
- data KeyWitnessInCtx witctx where
- data ScriptWitnessInCtx witctx where
- data ScriptDatum witctx where
- type ScriptRedeemer = ScriptData
- scriptWitnessScript ∷ ScriptWitness witctx era → ScriptInEra era
- data AnyScriptWitness era where
- AnyScriptWitness ∷ ScriptWitness witctx era → AnyScriptWitness era
- data ScriptWitnessIndex
- renderScriptWitnessIndex ∷ ScriptWitnessIndex → String
- collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)]
- mapTxScriptWitnesses ∷ ∀ era. (∀ witctx. ScriptWitnessIndex → ScriptWitness witctx era → ScriptWitness witctx era) → TxBodyContent BuildTx era → TxBodyContent BuildTx era
- data ScriptLanguageInEra lang era where
- SimpleScriptV1InShelley ∷ ScriptLanguageInEra SimpleScriptV1 ShelleyEra
- SimpleScriptV1InAllegra ∷ ScriptLanguageInEra SimpleScriptV1 AllegraEra
- SimpleScriptV1InMary ∷ ScriptLanguageInEra SimpleScriptV1 MaryEra
- SimpleScriptV1InAlonzo ∷ ScriptLanguageInEra SimpleScriptV1 AlonzoEra
- SimpleScriptV2InAllegra ∷ ScriptLanguageInEra SimpleScriptV2 AllegraEra
- SimpleScriptV2InMary ∷ ScriptLanguageInEra SimpleScriptV2 MaryEra
- SimpleScriptV2InAlonzo ∷ ScriptLanguageInEra SimpleScriptV2 AlonzoEra
- PlutusScriptV1InAlonzo ∷ ScriptLanguageInEra PlutusScriptV1 AlonzoEra
- PlutusScriptV2InAlonzo ∷ ScriptLanguageInEra PlutusScriptV2 AlonzoEra
- scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era)
- languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang
- eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era
- data SimpleScript lang where
- RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang
- RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang
- data TimeLocksSupported lang where
- timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang)
- adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang')
- data PlutusScript lang
- examplePlutusScriptAlwaysSucceeds ∷ WitCtx witctx → PlutusScript PlutusScriptV1
- examplePlutusScriptAlwaysFails ∷ WitCtx witctx → PlutusScript PlutusScriptV1
- data ScriptData
- hashScriptData ∷ ScriptData → Hash ScriptData
- data ScriptDataRangeError
- validateScriptData ∷ ScriptData → Either ScriptDataRangeError ()
- data ScriptDataJsonSchema
- scriptDataFromJson ∷ ScriptDataJsonSchema → Value → Either ScriptDataJsonError ScriptData
- scriptDataToJson ∷ ScriptDataJsonSchema → ScriptData → Value
- data ScriptDataJsonError
- data ScriptDataJsonSchemaError
- = ScriptDataJsonNullNotAllowed
- | ScriptDataJsonBoolNotAllowed
- | ScriptDataJsonNumberNotInteger !Double
- | ScriptDataJsonNotObject !Value
- | ScriptDataJsonBadObject ![(Text, Value)]
- | ScriptDataJsonBadMapPair !Value
- | ScriptDataJsonTypeMismatch !Text !Value
- data ExecutionUnits = ExecutionUnits {}
- data ExecutionUnitPrices = ExecutionUnitPrices {}
- newtype CostModel = CostModel (Map Text Integer)
- validateCostModel ∷ PlutusScriptVersion lang → CostModel → Either InvalidCostModel ()
- data ScriptHash
- hashScript ∷ Script lang → ScriptHash
- class HasTypeProxy a ⇒ SerialiseAsCBOR a
- class Typeable a ⇒ ToCBOR a
- class Typeable a ⇒ FromCBOR a
- serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString
- deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a
- class ToJSON a
- class FromJSON a
- serialiseToJSON ∷ ToJSON a ⇒ a → ByteString
- deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a
- newtype JsonDecodeError = JsonDecodeError String
- readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a)
- writeFileJSON ∷ ToJSON a ⇒ FilePath → a → IO (Either (FileError ()) ())
- prettyPrintJSON ∷ ToJSON a ⇒ a → ByteString
- class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a
- serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text
- deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a
- deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b
- data Bech32DecodeError
- = Bech32DecodingError !DecodingError
- | Bech32UnexpectedPrefix !Text !(Set Text)
- | Bech32DataPartToBytesError !Text
- | Bech32DeserialiseFromBytesError !ByteString
- | Bech32WrongPrefix !Text !Text
- class HasTypeProxy addr ⇒ SerialiseAddress addr
- serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text
- deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr
- class HasTypeProxy a ⇒ SerialiseAsRawBytes a
- serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHex ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text
- class SerialiseAsCBOR a ⇒ HasTextEnvelope a where
- data TextEnvelope = TextEnvelope {}
- newtype TextEnvelopeType = TextEnvelopeType String
- data TextEnvelopeDescr
- data TextEnvelopeError
- = TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType
- | TextEnvelopeDecodeError !DecoderError
- | TextEnvelopeAesonDecodeError !String
- textEnvelopeRawCBOR ∷ TextEnvelope → ByteString
- serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope
- deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a
- readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a)
- writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- data FromSomeTypeCDDL c b where
- FromCDDLTx ∷ Text → (InAnyCardanoEra Tx → b) → FromSomeTypeCDDL TextEnvelopeCddl b
- FromCDDLWitness ∷ Text → (InAnyCardanoEra KeyWitness → b) → FromSomeTypeCDDL TextEnvelopeCddl b
- readFileTextEnvelopeCddlAnyOf ∷ [FromSomeTypeCDDL TextEnvelopeCddl b] → FilePath → IO (Either (FileError TextEnvelopeCddlError) b)
- writeTxFileTextEnvelopeCddl ∷ IsCardanoEra era ⇒ FilePath → Tx era → IO (Either (FileError ()) ())
- writeTxWitnessFileTextEnvelopeCddl ∷ ShelleyBasedEra era → FilePath → KeyWitness era → IO (Either (FileError ()) ())
- serialiseTxLedgerCddl ∷ ∀ era. IsCardanoEra era ⇒ Tx era → TextEnvelopeCddl
- deserialiseTxLedgerCddl ∷ IsCardanoEra era ⇒ CardanoEra era → TextEnvelopeCddl → Either TextEnvelopeCddlError (Tx era)
- serialiseWitnessLedgerCddl ∷ ∀ era. ShelleyBasedEra era → KeyWitness era → TextEnvelopeCddl
- deserialiseWitnessLedgerCddl ∷ ShelleyBasedEra era → TextEnvelopeCddl → Either TextEnvelopeCddlError (KeyWitness era)
- data TextEnvelopeCddlError
- data FromSomeType (c ∷ Type → Constraint) b where
- FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b
- deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b
- readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b)
- class Show e ⇒ Error e where
- displayError ∷ e → String
- throwErrorAsException ∷ Error e ⇒ e → IO a
- data FileError e
- data Env = Env {
- envLedgerConfig ∷ HardForkLedgerConfig (CardanoEras StandardCrypto)
- envProtocolConfig ∷ ConsensusConfig (HardForkProtocol (CardanoEras StandardCrypto))
- envSecurityParam ∷ Env → Word64
- newtype LedgerState where
- LedgerState {
- clsState ∷ LedgerState (HardForkBlock (CardanoEras StandardCrypto))
- pattern LedgerStateByron ∷ LedgerState ByronBlock → LedgerState
- pattern LedgerStateShelley ∷ LedgerState (ShelleyBlock (ShelleyEra StandardCrypto)) → LedgerState
- pattern LedgerStateAllegra ∷ LedgerState (ShelleyBlock (AllegraEra StandardCrypto)) → LedgerState
- pattern LedgerStateMary ∷ LedgerState (ShelleyBlock (MaryEra StandardCrypto)) → LedgerState
- pattern LedgerStateAlonzo ∷ LedgerState (ShelleyBlock (AlonzoEra StandardCrypto)) → LedgerState
- LedgerState {
- initialLedgerState ∷ FilePath → ExceptT InitialLedgerStateError IO (Env, LedgerState)
- applyBlock ∷ Env → LedgerState → ValidationMode → Block era → Either LedgerStateError (LedgerState, [LedgerEvent])
- data ValidationMode
- data LedgerEvent
- = PoolRegistration Certificate
- | PoolReRegistration Certificate
- | IncrementalRewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto)))
- | RewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto)))
- | MIRDistribution MIRDistributionDetails
- | PoolReap PoolReapDetails
- data MIRDistributionDetails = MIRDistributionDetails {}
- data PoolReapDetails = PoolReapDetails {}
- toLedgerEvent ∷ ConvertLedgerEvent blk ⇒ WrapLedgerEvent blk → Maybe LedgerEvent
- foldBlocks ∷ ∀ a. FilePath → FilePath → ValidationMode → a → (Env → LedgerState → [LedgerEvent] → BlockInMode CardanoMode → a → IO a) → ExceptT FoldBlocksError IO a
- chainSyncClientWithLedgerState ∷ ∀ m a. Monad m ⇒ Env → LedgerState → ValidationMode → ChainSyncClient (BlockInMode CardanoMode, Either LedgerStateError (LedgerState, [LedgerEvent])) ChainPoint ChainTip m a → ChainSyncClient (BlockInMode CardanoMode) ChainPoint ChainTip m a
- chainSyncClientPipelinedWithLedgerState ∷ ∀ m a. Monad m ⇒ Env → LedgerState → ValidationMode → ChainSyncClientPipelined (BlockInMode CardanoMode, Either LedgerStateError (LedgerState, [LedgerEvent])) ChainPoint ChainTip m a → ChainSyncClientPipelined (BlockInMode CardanoMode) ChainPoint ChainTip m a
- data LedgerStateError
- = ApplyBlockHashMismatch Text
- | ApplyBlockError (HardForkLedgerError (CardanoEras StandardCrypto))
- | InvalidRollback SlotNo ChainPoint
- data FoldBlocksError
- data GenesisConfigError
- = NEError !Text
- | NEByronConfig !FilePath !ConfigurationError
- | NEShelleyConfig !FilePath !Text
- | NEAlonzoConfig !FilePath !Text
- | NECardanoConfig !Text
- data InitialLedgerStateError
- renderLedgerStateError ∷ LedgerStateError → Text
- renderFoldBlocksError ∷ FoldBlocksError → Text
- renderGenesisConfigError ∷ GenesisConfigError → Text
- renderInitialLedgerStateError ∷ InitialLedgerStateError → Text
- connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO ()
- connectToLocalNodeWithVersion ∷ LocalNodeConnectInfo mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → IO ()
- data LocalNodeConnectInfo mode = LocalNodeConnectInfo {}
- data AnyConsensusMode where
- renderMode ∷ AnyConsensusMode → Text
- data ConsensusMode mode where
- consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode
- data ConsensusModeIsMultiEra mode where
- data AnyConsensusModeParams where
- data ConsensusModeParams mode where
- type family ConsensusBlockForMode mode where ...
- type family ConsensusBlockForEra era where ...
- data EraInMode era mode where
- ByronEraInByronMode ∷ EraInMode ByronEra ByronMode
- ShelleyEraInShelleyMode ∷ EraInMode ShelleyEra ShelleyMode
- ByronEraInCardanoMode ∷ EraInMode ByronEra CardanoMode
- ShelleyEraInCardanoMode ∷ EraInMode ShelleyEra CardanoMode
- AllegraEraInCardanoMode ∷ EraInMode AllegraEra CardanoMode
- MaryEraInCardanoMode ∷ EraInMode MaryEra CardanoMode
- AlonzoEraInCardanoMode ∷ EraInMode AlonzoEra CardanoMode
- BabbageEraInCardanoMode ∷ EraInMode BabbageEra CardanoMode
- toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode)
- data LocalNodeClientProtocols block point tip slot tx txid txerr query m = LocalNodeClientProtocols {
- localChainSyncClient ∷ LocalChainSyncClient block point tip m
- localTxSubmissionClient ∷ Maybe (LocalTxSubmissionClient tx txerr m ())
- localStateQueryClient ∷ Maybe (LocalStateQueryClient block point query m ())
- localTxMonitoringClient ∷ Maybe (LocalTxMonitorClient txid tx slot m ())
- data LocalNodeClientParams where
- LocalNodeClientParams ∷ (SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block, ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (GenTx block), ShowProxy (Query block), ShowQuery (Query block), ProtocolClient block) ⇒ ProtocolClientInfoArgs block → (NodeToClientVersion → LocalNodeClientProtocolsForBlock block) → LocalNodeClientParams
- mkLocalNodeClientParams ∷ ∀ mode block. ConsensusBlockForMode mode ~ block ⇒ ConsensusModeParams mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → LocalNodeClientParams
- data LocalChainSyncClient block point tip m
- = NoLocalChainSyncClient
- | LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ())
- | LocalChainSyncClient (ChainSyncClient block point tip m ())
- data CardanoMode
- newtype ChainSyncClient header point tip (m ∷ Type → Type) a = ChainSyncClient {
- runChainSyncClient ∷ m (ClientStIdle header point tip m a)
- newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a = ChainSyncClientPipelined {
- runChainSyncClientPipelined ∷ m (ClientPipelinedStIdle 'Z header point tip m a)
- data BlockInMode mode where
- BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode
- type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip SlotNo (TxInMode mode) (TxIdInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO
- data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a
- data TxInMode mode where
- data TxValidationErrorInMode mode where
- TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode
- TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode
- runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a)
- submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode))
- newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a = LocalStateQueryClient {
- runLocalStateQueryClient ∷ m (ClientStIdle block point query m a)
- data QueryInMode mode result where
- QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra
- QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result)
- QueryEraHistory ∷ ConsensusModeIsMultiEra mode → QueryInMode mode (EraHistory mode)
- QuerySystemStart ∷ QueryInMode mode SystemStart
- QueryChainBlockNo ∷ QueryInMode mode (WithOrigin BlockNo)
- QueryChainPoint ∷ ConsensusMode mode → QueryInMode mode ChainPoint
- data QueryInEra era result where
- QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState
- QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result
- data QueryInShelleyBasedEra era result where
- QueryEpoch ∷ QueryInShelleyBasedEra era EpochNo
- QueryGenesisParameters ∷ QueryInShelleyBasedEra era GenesisParameters
- QueryProtocolParameters ∷ QueryInShelleyBasedEra era ProtocolParameters
- QueryProtocolParametersUpdate ∷ QueryInShelleyBasedEra era (Map (Hash GenesisKey) ProtocolParametersUpdate)
- QueryStakeDistribution ∷ QueryInShelleyBasedEra era (Map (Hash StakePoolKey) Rational)
- QueryUTxO ∷ QueryUTxOFilter → QueryInShelleyBasedEra era (UTxO era)
- QueryStakeAddresses ∷ Set StakeCredential → NetworkId → QueryInShelleyBasedEra era (Map StakeAddress Lovelace, Map StakeAddress PoolId)
- QueryStakePools ∷ QueryInShelleyBasedEra era (Set PoolId)
- QueryStakePoolParameters ∷ Set PoolId → QueryInShelleyBasedEra era (Map PoolId StakePoolParameters)
- QueryDebugLedgerState ∷ QueryInShelleyBasedEra era (SerialisedDebugLedgerState era)
- QueryProtocolState ∷ QueryInShelleyBasedEra era (ProtocolState era)
- QueryCurrentEpochState ∷ QueryInShelleyBasedEra era (SerialisedCurrentEpochState era)
- data QueryUTxOFilter
- newtype UTxO era = UTxO {}
- queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result)
- newtype LocalTxMonitorClient txid tx slot (m ∷ Type → Type) a = LocalTxMonitorClient {
- runLocalTxMonitorClient ∷ m (ClientStIdle txid tx slot m a)
- data LocalTxMonitoringQuery mode
- data LocalTxMonitoringResult mode
- data MempoolSizeAndCapacity = MempoolSizeAndCapacity {}
- queryTxMonitoringLocal ∷ ∀ mode. LocalNodeConnectInfo mode → LocalTxMonitoringQuery mode → IO (LocalTxMonitoringResult mode)
- data EraHistory mode where
- EraHistory ∷ ConsensusBlockForMode mode ~ HardForkBlock xs ⇒ ConsensusMode mode → Interpreter xs → EraHistory mode
- getProgress ∷ SlotNo → EraHistory mode → Either PastHorizonException (RelativeTime, SlotLength)
- getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip
- data OperationalCertificate
- data OperationalCertificateIssueCounter
- data OperationalCertIssueError
- getHotKey ∷ OperationalCertificate → VerificationKey KesKey
- getKesPeriod ∷ OperationalCertificate → Word
- getOpCertCount ∷ OperationalCertificate → Word64
- issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter)
- data GenesisKey
- data GenesisExtendedKey
- data GenesisDelegateKey
- data GenesisDelegateExtendedKey
- data GenesisUTxOKey
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- data GenesisParameters = GenesisParameters {
- protocolParamSystemStart ∷ UTCTime
- protocolParamNetworkId ∷ NetworkId
- protocolParamActiveSlotsCoefficient ∷ Rational
- protocolParamSecurity ∷ Int
- protocolParamEpochLength ∷ EpochSize
- protocolParamSlotLength ∷ NominalDiffTime
- protocolParamSlotsPerKESPeriod ∷ Int
- protocolParamMaxKESEvolutions ∷ Int
- protocolParamUpdateQuorum ∷ Int
- protocolParamMaxLovelaceSupply ∷ Lovelace
- protocolInitialUpdateableProtocolParameters ∷ ProtocolParameters
- makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate
- makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate
- data MIRTarget
- data UpdateProposal = UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo
- data ProtocolParametersUpdate = ProtocolParametersUpdate {
- protocolUpdateProtocolVersion ∷ Maybe (Natural, Natural)
- protocolUpdateDecentralization ∷ Maybe Rational
- protocolUpdateExtraPraosEntropy ∷ Maybe (Maybe PraosNonce)
- protocolUpdateMaxBlockHeaderSize ∷ Maybe Natural
- protocolUpdateMaxBlockBodySize ∷ Maybe Natural
- protocolUpdateMaxTxSize ∷ Maybe Natural
- protocolUpdateTxFeeFixed ∷ Maybe Natural
- protocolUpdateTxFeePerByte ∷ Maybe Natural
- protocolUpdateMinUTxOValue ∷ Maybe Lovelace
- protocolUpdateStakeAddressDeposit ∷ Maybe Lovelace
- protocolUpdateStakePoolDeposit ∷ Maybe Lovelace
- protocolUpdateMinPoolCost ∷ Maybe Lovelace
- protocolUpdatePoolRetireMaxEpoch ∷ Maybe EpochNo
- protocolUpdateStakePoolTargetNum ∷ Maybe Natural
- protocolUpdatePoolPledgeInfluence ∷ Maybe Rational
- protocolUpdateMonetaryExpansion ∷ Maybe Rational
- protocolUpdateTreasuryCut ∷ Maybe Rational
- protocolUpdateUTxOCostPerWord ∷ Maybe Lovelace
- protocolUpdateCostModels ∷ Map AnyPlutusScriptVersion CostModel
- protocolUpdatePrices ∷ Maybe ExecutionUnitPrices
- protocolUpdateMaxTxExUnits ∷ Maybe ExecutionUnits
- protocolUpdateMaxBlockExUnits ∷ Maybe ExecutionUnits
- protocolUpdateMaxValueSize ∷ Maybe Natural
- protocolUpdateCollateralPercent ∷ Maybe Natural
- protocolUpdateMaxCollateralInputs ∷ Maybe Natural
- makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal
- data PraosNonce
- makePraosNonce ∷ ByteString → PraosNonce
- newtype NetworkMagic = NetworkMagic {}
- toLedgerPParams ∷ ShelleyBasedEra era → ProtocolParameters → PParams (ShelleyLedgerEra era)
- fromLedgerPParams ∷ ShelleyBasedEra era → PParams (ShelleyLedgerEra era) → ProtocolParameters
- toCtxUTxOTxOut ∷ TxOut CtxTx era → TxOut CtxUTxO era
- fromNetworkMagic ∷ NetworkMagic → NetworkId
- toNetworkMagic ∷ NetworkId → NetworkMagic
- fromLedgerTxOuts ∷ ∀ era. ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxBodyScriptData era → [TxOut CtxTx era]
- toLedgerUTxO ∷ ShelleyLedgerEra era ~ ledgerera ⇒ Crypto ledgerera ~ StandardCrypto ⇒ ShelleyBasedEra era → UTxO era → UTxO ledgerera
- runParsecParser ∷ Parser a → Text → Parser a
- newtype SlotsInEpoch = SlotsInEpoch Word64
- newtype SlotsToEpochEnd = SlotsToEpochEnd Word64
- slotToEpoch ∷ SlotNo → EraHistory mode → Either PastHorizonException (EpochNo, SlotsInEpoch, SlotsToEpochEnd)
- data NodeToClientVersion
- data LocalStateQueryExpr block point query r m a
- executeLocalStateQueryExpr ∷ LocalNodeConnectInfo mode → Maybe ChainPoint → (NodeToClientVersion → LocalStateQueryExpr (BlockInMode mode) ChainPoint (QueryInMode mode) () IO a) → IO (Either AcquireFailure a)
- queryExpr ∷ QueryInMode mode a → LocalStateQueryExpr block point (QueryInMode mode) r IO a
- determineEraExpr ∷ ConsensusModeParams mode → LocalStateQueryExpr block point (QueryInMode mode) r IO AnyCardanoEra
- chainPointToSlotNo ∷ ChainPoint → Maybe SlotNo
- chainPointToHeaderHash ∷ ChainPoint → Maybe (Hash BlockHeader)
- makeChainTip ∷ WithOrigin BlockNo → ChainPoint → ChainTip
Eras
A type used as a tag to distinguish the Byron era.
Instances
| HasTypeProxy ByronEra Source # | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| FromJSON (EraInMode ByronEra CardanoMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode ByronEra CardanoMode) # parseJSONList ∷ Value → Parser [EraInMode ByronEra CardanoMode] # | |
| FromJSON (EraInMode ByronEra ByronMode) Source # | |
| data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras | |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
| HasTypeProxy ShelleyEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType ShelleyEra Source # Methods proxyToAsType ∷ Proxy ShelleyEra → AsType ShelleyEra Source # | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| FromJSON (EraInMode ShelleyEra CardanoMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode ShelleyEra CardanoMode) # parseJSONList ∷ Value → Parser [EraInMode ShelleyEra CardanoMode] # | |
| FromJSON (EraInMode ShelleyEra ShelleyMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode ShelleyEra ShelleyMode) # parseJSONList ∷ Value → Parser [EraInMode ShelleyEra ShelleyMode] # | |
| data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras | |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
| HasTypeProxy AllegraEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType AllegraEra Source # Methods proxyToAsType ∷ Proxy AllegraEra → AsType AllegraEra Source # | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| FromJSON (EraInMode AllegraEra CardanoMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode AllegraEra CardanoMode) # parseJSONList ∷ Value → Parser [EraInMode AllegraEra CardanoMode] # | |
| data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Mary era.
Instances
| HasTypeProxy MaryEra Source # | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| FromJSON (EraInMode MaryEra CardanoMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode MaryEra CardanoMode) # parseJSONList ∷ Value → Parser [EraInMode MaryEra CardanoMode] # | |
| data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Alonzo era.
Instances
| HasTypeProxy AlonzoEra Source # | |
| IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| FromJSON (EraInMode AlonzoEra CardanoMode) Source # | |
Defined in Cardano.Api.Modes Methods parseJSON ∷ Value → Parser (EraInMode AlonzoEra CardanoMode) # parseJSONList ∷ Value → Parser [EraInMode AlonzoEra CardanoMode] # | |
| data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras | |
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the IsCardanoEra class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
Constructors
| ByronEra ∷ CardanoEra ByronEra | |
| ShelleyEra ∷ CardanoEra ShelleyEra | |
| AllegraEra ∷ CardanoEra AllegraEra | |
| MaryEra ∷ CardanoEra MaryEra | |
| AlonzoEra ∷ CardanoEra AlonzoEra | |
| BabbageEra ∷ CardanoEra BabbageEra |
Instances
class HasTypeProxy era ⇒ IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the CardanoEra
constructors, or the CardanoEraStyle constructors via cardanoEraStyle.
Methods
cardanoEra ∷ CardanoEra era Source #
Instances
| IsCardanoEra BabbageEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data AnyCardanoEra where Source #
Constructors
| AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra |
Instances
anyCardanoEra ∷ CardanoEra era → AnyCardanoEra Source #
Like the AnyCardanoEra constructor but does not demand a IsCardanoEra
class constraint.
data InAnyCardanoEra thing where Source #
This pairs up some era-dependent type with a CardanoEra value that tells
us what era it is, but hides the era type. This is useful when the era is
not statically known, for example when deserialising from a file.
Constructors
| InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing |
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Constructors
Instances
| Eq (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # (/=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # | |
| Ord (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ ShelleyBasedEra era → ShelleyBasedEra era → Ordering Source # (<) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # (<=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # (>) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # (>=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool Source # max ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era Source # min ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era Source # | |
| Show (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras | |
class IsCardanoEra era ⇒ IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the ShelleyBasedEra constructors.
Methods
Instances
| IsShelleyBasedEra BabbageEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data InAnyShelleyBasedEra thing where Source #
This pairs up some era-dependent type with a ShelleyBasedEra value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
Constructors
| InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing |
data CardanoEraStyle era where Source #
This is the same essential information as CardanoEra but instead of a
flat set of alternative eras, it is factored into the legcy Byron era and
the current Shelley-based eras.
This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.
Constructors
| LegacyByronEra ∷ CardanoEraStyle ByronEra | |
| ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era |
Instances
| Eq (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # (/=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # | |
| Ord (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ CardanoEraStyle era → CardanoEraStyle era → Ordering Source # (<) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # (<=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # (>) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # (>=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool Source # max ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era Source # min ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era Source # | |
| Show (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras | |
cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era Source #
The CardanoEraStyle for a CardanoEra.
shelleyBasedToCardanoEra ∷ ShelleyBasedEra era → CardanoEra era Source #
Converts a ShelleyBasedEra to the broader CardanoEra.
Deprecated
type Shelley = ShelleyEra Source #
Deprecated: Use ShelleyEra or ShelleyAddr as appropriate
type Allegra = AllegraEra Source #
Deprecated: Use AllegraEra instead
Type tags
class HasTypeProxy t where Source #
Associated Types
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Methods
proxyToAsType ∷ Proxy t → AsType t Source #
Instances
Cryptographic key interface
class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole Source #
An interface for cryptographic keys used for signatures with a SigningKey
and a VerificationKey key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
Minimal complete definition
getVerificationKey, deterministicSigningKey, deterministicSigningKeySeedSize, verificationKeyHash
Instances
data family VerificationKey keyrole ∷ Type Source #
The type of cryptographic verification key, for each key role.
Instances
getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole Source #
castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB Source #
Change the role of a VerificationKey, if the representation permits.
castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB Source #
Change the role of a SigningKey, if the representation permits.
Generating keys
generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole) Source #
Generate a SigningKey using a seed from operating system entropy.
deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole Source #
Generate a SigningKey deterministically, given a Seed. The
required size of the seed is given by deterministicSigningKeySeedSize.
Hashes
In Cardano most keys are identified by their hash, and hashes are used in many other places.
data family Hash keyrole ∷ Type Source #
Instances
Payment addresses
Constructing and inspecting normal payment addresses
data Address addrtype Source #
Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.
There are currently two types of address:
- Byron addresses, which use the type tag
ByronAddr; and - Shelley addresses, which use the type tag
ShelleyAddr. Notably, Shelley addresses support scripts and stake delegation.
The address type is subtly from the ledger era in which each
address type is valid: while Byron addresses are the only choice in the
Byron era, the Shelley era and all subsequent eras support both Byron and
Shelley addresses. The Address type param only says the type of the address
(either Byron or Shelley). The AddressInEra type connects the address type
with the era in which it is supported.
Instances
A type used as a tag to distinguish Byron addresses.
Instances
| HasTypeProxy ByronAddr Source # | |
| SerialiseAsRawBytes (Address ByronAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseToRawBytes ∷ Address ByronAddr → ByteString Source # deserialiseFromRawBytes ∷ AsType (Address ByronAddr) → ByteString → Maybe (Address ByronAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
| data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data ShelleyAddr Source #
A type used as a tag to distinguish Shelley addresses.
Instances
| HasTypeProxy ShelleyAddr Source # | |
Defined in Cardano.Api.Address Associated Types data AsType ShelleyAddr Source # Methods proxyToAsType ∷ Proxy ShelleyAddr → AsType ShelleyAddr Source # | |
| SerialiseAsRawBytes (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address | |
| SerialiseAsBech32 (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods bech32PrefixFor ∷ Address ShelleyAddr → Text Source # bech32PrefixesPermitted ∷ AsType (Address ShelleyAddr) → [Text] Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
Byron addresses
Byron-era payment keys. Used for Byron addresses and witnessing transactions that spend from these addresses.
These use Ed25519 but with a 32byte "chaincode" used in HD derivation.
The inclusion of the chaincode is a design mistake but one that cannot
be corrected for the Byron era. The Shelley era PaymentKeys do not include
a chaincode. It is safe to use a zero or random chaincode for new Byron keys.
This is a type level tag, used with other interfaces like Key.
Instances
data ByronKeyLegacy Source #
Instances
Shelley addresses
makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr Source #
data PaymentCredential Source #
Constructors
| PaymentCredentialByKey (Hash PaymentKey) | |
| PaymentCredentialByScript ScriptHash |
Instances
| Eq PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ PaymentCredential → PaymentCredential → Bool Source # (/=) ∷ PaymentCredential → PaymentCredential → Bool Source # | |
| Ord PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ PaymentCredential → PaymentCredential → Ordering Source # (<) ∷ PaymentCredential → PaymentCredential → Bool Source # (<=) ∷ PaymentCredential → PaymentCredential → Bool Source # (>) ∷ PaymentCredential → PaymentCredential → Bool Source # (>=) ∷ PaymentCredential → PaymentCredential → Bool Source # max ∷ PaymentCredential → PaymentCredential → PaymentCredential Source # min ∷ PaymentCredential → PaymentCredential → PaymentCredential Source # | |
| Show PaymentCredential Source # | |
Defined in Cardano.Api.Address | |
newtype StakeAddressPointer Source #
Constructors
| StakeAddressPointer | |
Fields
| |
Instances
| Eq StakeAddressPointer Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeAddressPointer → StakeAddressPointer → Bool Source # (/=) ∷ StakeAddressPointer → StakeAddressPointer → Bool Source # | |
| Show StakeAddressPointer Source # | |
Defined in Cardano.Api.Address | |
data StakeAddressReference Source #
Constructors
| StakeAddressByValue StakeCredential | |
| StakeAddressByPointer StakeAddressPointer | |
| NoStakeAddress |
Instances
| Eq StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeAddressReference → StakeAddressReference → Bool Source # (/=) ∷ StakeAddressReference → StakeAddressReference → Bool Source # | |
| Show StakeAddressReference Source # | |
Defined in Cardano.Api.Address | |
data PaymentKey Source #
Shelley-era payment keys. Used for Shelley payment addresses and witnessing transactions that spend from these addresses.
This is a type level tag, used with other interfaces like Key.
Instances
data PaymentExtendedKey Source #
Shelley-era payment keys using extended ed25519 cryptographic keys.
They can be used for Shelley payment addresses and witnessing transactions that spend from these addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey PaymentKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey PaymentKey).
This is a type level tag, used with other interfaces like Key.
Instances
Addresses in any era
data AddressAny Source #
Either a Byron address or a Shelley address.
Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.
Constructors
| AddressByron !(Address ByronAddr) | |
| AddressShelley !(Address ShelleyAddr) |
Instances
Addresses in specific eras
data AddressInEra era where Source #
An Address that can be used in a particular ledger era.
All current ledger eras support Byron addresses. Shelley addresses are
supported in the ShelleyEra and later eras.
Constructors
| AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era |
Instances
isKeyAddress ∷ AddressInEra era → Bool Source #
Is the UTxO at the address only spendable via a key witness.
data AddressTypeInEra addrtype era where Source #
Constructors
| ByronAddressInAnyEra ∷ AddressTypeInEra ByronAddr era | |
| ShelleyAddressInEra ∷ ShelleyBasedEra era → AddressTypeInEra ShelleyAddr era |
Instances
| Show (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address | |
byronAddressInEra ∷ Address ByronAddr → AddressInEra era Source #
shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era Source #
anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era Source #
anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era) Source #
toAddressAny ∷ Address addr → AddressAny Source #
makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era Source #
Stake addresses
Constructing and inspecting stake addresses
data StakeAddress Source #
Instances
data StakeCredential Source #
Instances
| Eq StakeCredential Source # | |
Defined in Cardano.Api.Address Methods | |
| Ord StakeCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ StakeCredential → StakeCredential → Ordering Source # (<) ∷ StakeCredential → StakeCredential → Bool Source # (<=) ∷ StakeCredential → StakeCredential → Bool Source # (>) ∷ StakeCredential → StakeCredential → Bool Source # (>=) ∷ StakeCredential → StakeCredential → Bool Source # max ∷ StakeCredential → StakeCredential → StakeCredential Source # min ∷ StakeCredential → StakeCredential → StakeCredential Source # | |
| Show StakeCredential Source # | |
Defined in Cardano.Api.Address | |
Instances
data StakeExtendedKey Source #
Shelley-era stake keys using extended ed25519 cryptographic keys.
They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey StakeKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey StakeKey).
This is a type level tag, used with other interfaces like Key.
Instances
Currency values
Ada / Lovelace
Instances
| Enum Lovelace Source # | |
Defined in Cardano.Api.Value Methods succ ∷ Lovelace → Lovelace Source # pred ∷ Lovelace → Lovelace Source # toEnum ∷ Int → Lovelace Source # fromEnum ∷ Lovelace → Int Source # enumFrom ∷ Lovelace → [Lovelace] Source # enumFromThen ∷ Lovelace → Lovelace → [Lovelace] Source # enumFromTo ∷ Lovelace → Lovelace → [Lovelace] Source # enumFromThenTo ∷ Lovelace → Lovelace → Lovelace → [Lovelace] Source # | |
| Eq Lovelace Source # | |
| Num Lovelace Source # | |
Defined in Cardano.Api.Value | |
| Ord Lovelace Source # | |
| Show Lovelace Source # | |
| Semigroup Lovelace Source # | |
| Monoid Lovelace Source # | |
| FromJSON Lovelace Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| FromCBOR Lovelace Source # | |
| ToCBOR Lovelace Source # | |
Multi-asset values
Instances
| Eq Quantity Source # | |
| Num Quantity Source # | |
Defined in Cardano.Api.Value | |
| Ord Quantity Source # | |
| Show Quantity Source # | |
| Semigroup Quantity Source # | |
| Monoid Quantity Source # | |
| FromJSON Quantity Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
Constructors
| PolicyId ScriptHash |
Instances
| Eq PolicyId Source # | |
| Ord PolicyId Source # | |
| Show PolicyId Source # | |
| IsString PolicyId Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → PolicyId Source # | |
| FromJSON PolicyId Source # | |
Defined in Cardano.Api.Value | |
| ToJSON PolicyId Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ PolicyId → Encoding # toJSONList ∷ [PolicyId] → Value # toEncodingList ∷ [PolicyId] → Encoding # | |
| HasTypeProxy PolicyId Source # | |
| SerialiseAsRawBytes PolicyId Source # | |
Defined in Cardano.Api.Value Methods serialiseToRawBytes ∷ PolicyId → ByteString Source # deserialiseFromRawBytes ∷ AsType PolicyId → ByteString → Maybe PolicyId Source # | |
| data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
scriptPolicyId ∷ Script lang → PolicyId Source #
Constructors
| AssetName ByteString |
Instances
| Eq AssetName Source # | |
| Ord AssetName Source # | |
Defined in Cardano.Api.Value | |
| Show AssetName Source # | |
| IsString AssetName Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → AssetName Source # | |
| FromJSON AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| FromJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| HasTypeProxy AssetName Source # | |
| SerialiseAsRawBytes AssetName Source # | |
Defined in Cardano.Api.Value | |
| data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AdaAssetId | |
| AssetId !PolicyId !AssetName |
Instances
negateValue ∷ Value → Value Source #
This lets you write a - b as a <> negateValue b.
newtype ValueNestedRep Source #
Constructors
| ValueNestedRep [ValueNestedBundle] |
Instances
| Eq ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods (==) ∷ ValueNestedRep → ValueNestedRep → Bool Source # (/=) ∷ ValueNestedRep → ValueNestedRep → Bool Source # | |
| Ord ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedRep → ValueNestedRep → Ordering Source # (<) ∷ ValueNestedRep → ValueNestedRep → Bool Source # (<=) ∷ ValueNestedRep → ValueNestedRep → Bool Source # (>) ∷ ValueNestedRep → ValueNestedRep → Bool Source # (>=) ∷ ValueNestedRep → ValueNestedRep → Bool Source # max ∷ ValueNestedRep → ValueNestedRep → ValueNestedRep Source # min ∷ ValueNestedRep → ValueNestedRep → ValueNestedRep Source # | |
| Show ValueNestedRep Source # | |
Defined in Cardano.Api.Value | |
| FromJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
data ValueNestedBundle Source #
A bundle within a ValueNestedRep for a single PolicyId, or for the
special case of ada.
Constructors
| ValueNestedBundleAda Quantity | |
| ValueNestedBundle PolicyId (Map AssetName Quantity) |
Instances
| Eq ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods (==) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # (/=) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # | |
| Ord ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedBundle → ValueNestedBundle → Ordering Source # (<) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # (<=) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # (>) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # (>=) ∷ ValueNestedBundle → ValueNestedBundle → Bool Source # max ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle Source # min ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle Source # | |
| Show ValueNestedBundle Source # | |
Defined in Cardano.Api.Value | |
Ada / Lovelace within multi-asset values
valueToLovelace ∷ Value → Maybe Lovelace Source #
Check if the Value consists of only Lovelace and no other assets,
and if so then return the Lovelace.
See also selectLovelace to select the Lovelace quantity from the Value,
ignoring other assets.
Blocks
Blocks in the context of an era
A blockchain block in a particular Cardano era.
Bundled Patterns
| pattern Block ∷ BlockHeader → [Tx era] → Block era | A block consists of a header and a body containing transactions. |
data BlockHeader Source #
Constructors
| BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
getBlockHeader ∷ ∀ era. Block era → BlockHeader Source #
Points on the chain
data ChainPoint Source #
Constructors
| ChainPointAtGenesis | |
| ChainPoint !SlotNo !(Hash BlockHeader) |
Instances
| Eq ChainPoint Source # | |
Defined in Cardano.Api.Block | |
| Show ChainPoint Source # | |
Defined in Cardano.Api.Block | |
Instances
Tip of the chain
This is like a ChainPoint but is conventionally used for the tip of the
chain: that is the most recent block at the end of the chain.
It also carries the BlockNo of the chain tip.
Constructors
| ChainTipAtGenesis | |
| ChainTip !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
Building transactions
Building transactions
Constructing and inspecting transactions
Transaction bodies
data TxBody era where Source #
Bundled Patterns
| pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era |
Instances
| Eq (TxBody era) Source # | |
| Show (TxBody era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
| data AsType (TxBody era) Source # | |
Defined in Cardano.Api.TxBody | |
makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era) Source #
data TxBodyContent build era Source #
Constructors
| TxBodyContent | |
Fields
| |
Instances
| Eq (TxBodyContent build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyContent build era → TxBodyContent build era → Bool Source # (/=) ∷ TxBodyContent build era → TxBodyContent build era → Bool Source # | |
| Show (TxBodyContent build era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxBodyError Source #
Constructors
Instances
| Eq TxBodyError Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyError → TxBodyError → Bool Source # (/=) ∷ TxBodyError → TxBodyError → Bool Source # | |
| Show TxBodyError Source # | |
Defined in Cardano.Api.TxBody | |
| Error TxBodyError Source # | |
Defined in Cardano.Api.TxBody Methods | |
data TxBodyScriptData era where Source #
Constructors
| TxBodyNoScriptData ∷ TxBodyScriptData era | |
| TxBodyScriptData ∷ ScriptDataSupportedInEra era → TxDats (ShelleyLedgerEra era) → Redeemers (ShelleyLedgerEra era) → TxBodyScriptData era |
Instances
| Eq (TxBodyScriptData era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # (/=) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # | |
| Show (TxBodyScriptData era) Source # | |
Defined in Cardano.Api.TxBody | |
Transaction Ids
Constructors
| TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
| Eq TxId Source # | |
| Ord TxId Source # | |
| Show TxId Source # | |
| IsString TxId Source # | |
Defined in Cardano.Api.TxBody Methods fromString ∷ String → TxId Source # | |
| FromJSON TxId Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| FromJSONKey TxId Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSONKey TxId Source # | |
Defined in Cardano.Api.TxBody | |
| HasTypeProxy TxId Source # | |
| SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToRawBytes ∷ TxId → ByteString Source # deserialiseFromRawBytes ∷ AsType TxId → ByteString → Maybe TxId Source # | |
| data AsType TxId Source # | |
Defined in Cardano.Api.TxBody | |
Transaction inputs
Instances
| Eq TxIn Source # | |
| Ord TxIn Source # | |
| Show TxIn Source # | |
| FromJSON TxIn Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSON TxIn Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| FromJSONKey TxIn Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSONKey TxIn Source # | |
Defined in Cardano.Api.TxBody | |
Instances
| Enum TxIx Source # | |
Defined in Cardano.Api.TxBody | |
| Eq TxIx Source # | |
| Ord TxIx Source # | |
| Show TxIx Source # | |
| FromJSON TxIx Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSON TxIx Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
renderTxIn ∷ TxIn → Text Source #
Transaction outputs
The context is a transaction body
Instances
| (IsShelleyBasedEra era, IsCardanoEra era) ⇒ FromJSON (TxOut CtxTx era) Source # | |
Defined in Cardano.Api.TxBody | |
The context is the UTxO
Instances
| (IsShelleyBasedEra era, IsCardanoEra era) ⇒ FromJSON (TxOut CtxUTxO era) Source # | |
Defined in Cardano.Api.TxBody | |
Constructors
| TxOut (AddressInEra era) (TxOutValue era) (TxOutDatum ctx era) (ReferenceScript era) |
Instances
| Eq (TxOut ctx era) Source # | |
| Show (TxOut ctx era) Source # | |
| (IsShelleyBasedEra era, IsCardanoEra era) ⇒ FromJSON (TxOut CtxUTxO era) Source # | |
Defined in Cardano.Api.TxBody | |
| (IsShelleyBasedEra era, IsCardanoEra era) ⇒ FromJSON (TxOut CtxTx era) Source # | |
Defined in Cardano.Api.TxBody | |
| IsCardanoEra era ⇒ ToJSON (TxOut ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOut ctx era → Value # toEncoding ∷ TxOut ctx era → Encoding # toJSONList ∷ [TxOut ctx era] → Value # toEncodingList ∷ [TxOut ctx era] → Encoding # | |
data TxOutValue era where Source #
Constructors
| TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era | |
| TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
txOutValueToLovelace ∷ TxOutValue era → Lovelace Source #
txOutValueToValue ∷ TxOutValue era → Value Source #
lovelaceToTxOutValue ∷ IsCardanoEra era ⇒ Lovelace → TxOutValue era Source #
data TxOutDatum ctx era where Source #
Constructors
| TxOutDatumNone ∷ TxOutDatum ctx era | |
| TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatum ctx era | A transaction output that only specifies the hash of the datum, but not the full datum value. |
| TxOutDatumInline ∷ InlineDatumSupportedInEra era → ScriptData → TxOutDatum ctx era | A transaction output that specifies the whole datum instead of the datum hash. Note that the datum map will not be updated with this datum, it only exists at the transaction output. |
Bundled Patterns
| pattern TxOutDatumInTx ∷ ScriptDataSupportedInEra era → ScriptData → TxOutDatum CtxTx era |
Instances
| Eq (TxOutDatum ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxOutDatum ctx era → TxOutDatum ctx era → Bool Source # (/=) ∷ TxOutDatum ctx era → TxOutDatum ctx era → Bool Source # | |
| Show (TxOutDatum ctx era) Source # | |
Defined in Cardano.Api.TxBody | |
Other transaction body types
data TxInsCollateral era where Source #
Constructors
| TxInsCollateralNone ∷ TxInsCollateral era | |
| TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era |
Instances
| Eq (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # (/=) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # | |
| Show (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxTotalCollateral era where Source #
Constructors
| TxTotalCollateralNone ∷ TxTotalCollateral era | |
| TxTotalCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → Lovelace → TxTotalCollateral era |
Instances
| Eq (TxTotalCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxTotalCollateral era → TxTotalCollateral era → Bool Source # (/=) ∷ TxTotalCollateral era → TxTotalCollateral era → Bool Source # | |
| Show (TxTotalCollateral era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxReturnCollateral ctx era where Source #
Constructors
| TxReturnCollateralNone ∷ TxReturnCollateral ctx era | |
| TxReturnCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → TxOut ctx era → TxReturnCollateral ctx era |
Instances
| Eq (TxReturnCollateral ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxReturnCollateral ctx era → TxReturnCollateral ctx era → Bool Source # (/=) ∷ TxReturnCollateral ctx era → TxReturnCollateral ctx era → Bool Source # | |
| Show (TxReturnCollateral ctx era) Source # | |
Defined in Cardano.Api.TxBody | |
Constructors
| TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
| TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era |
data TxValidityLowerBound era where Source #
Constructors
| TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
| TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
| Eq (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # | |
| Show (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
Constructors
| TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
| TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
| Eq (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # | |
| Show (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody | |
Instances
| Bounded SlotNo | |
| Enum SlotNo | |
Defined in Cardano.Slotting.Slot Methods succ ∷ SlotNo → SlotNo Source # pred ∷ SlotNo → SlotNo Source # toEnum ∷ Int → SlotNo Source # fromEnum ∷ SlotNo → Int Source # enumFrom ∷ SlotNo → [SlotNo] Source # enumFromThen ∷ SlotNo → SlotNo → [SlotNo] Source # enumFromTo ∷ SlotNo → SlotNo → [SlotNo] Source # enumFromThenTo ∷ SlotNo → SlotNo → SlotNo → [SlotNo] Source # | |
| Eq SlotNo | |
| Num SlotNo | |
| Ord SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Show SlotNo | |
| Generic SlotNo | |
| NFData SlotNo | |
Defined in Cardano.Slotting.Slot | |
| FromJSON SlotNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks SlotNo | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| FromCBOR SlotNo | |
| ToCBOR SlotNo | |
| Serialise SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Condense SlotNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| HasField "ttl" (TxBody era) SlotNo | |
Defined in Cardano.Ledger.Shelley.TxBody | |
| HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block | |
Defined in Ouroboros.Network.AnchoredFragment Methods asAnchor ∷ block → Anchor block getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo | |
| Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) | |
Defined in Ouroboros.Consensus.HeaderValidation Methods asAnchor ∷ HeaderState blk → HeaderState blk getAnchorMeasure ∷ Proxy (HeaderState blk) → HeaderState blk → WithOrigin SlotNo | |
| GetTip l ⇒ Anchorable (WithOrigin SlotNo) (Checkpoint l) (Checkpoint l) | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory Methods asAnchor ∷ Checkpoint l → Checkpoint l getAnchorMeasure ∷ Proxy (Checkpoint l) → Checkpoint l → WithOrigin SlotNo | |
| Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
| HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Cardano.Ledger.Shelley.TxBody | |
| type Rep SlotNo | |
Defined in Cardano.Slotting.Slot type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-d6e9a832ff5de5a5c17ce838595b85b114c65c5e71df46b35fbc18c724879709" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
newtype EpochSlots #
Constructors
| EpochSlots | |
Fields | |
Instances
data TxMetadataInEra era where Source #
Constructors
| TxMetadataNone ∷ TxMetadataInEra era | |
| TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
| Eq (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # | |
| Show (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxAuxScripts era where Source #
Constructors
| TxAuxScriptsNone ∷ TxAuxScripts era | |
| TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
| Eq (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # | |
| Show (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxExtraKeyWitnesses era where Source #
Constructors
| TxExtraKeyWitnessesNone ∷ TxExtraKeyWitnesses era | |
| TxExtraKeyWitnesses ∷ TxExtraKeyWitnessesSupportedInEra era → [Hash PaymentKey] → TxExtraKeyWitnesses era |
Instances
| Eq (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # (/=) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # | |
| Show (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxWithdrawals build era where Source #
Constructors
| TxWithdrawalsNone ∷ TxWithdrawals build era | |
| TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era |
Instances
| Eq (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # (/=) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # | |
| Show (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxCertificates build era where Source #
Constructors
| TxCertificatesNone ∷ TxCertificates build era | |
| TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era |
Instances
| Eq (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxCertificates build era → TxCertificates build era → Bool Source # (/=) ∷ TxCertificates build era → TxCertificates build era → Bool Source # | |
| Show (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxUpdateProposal era where Source #
Constructors
| TxUpdateProposalNone ∷ TxUpdateProposal era | |
| TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
| Eq (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # | |
| Show (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxMintValue build era where Source #
Constructors
| TxMintNone ∷ TxMintValue build era | |
| TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era |
Instances
| Eq (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMintValue build era → TxMintValue build era → Bool Source # (/=) ∷ TxMintValue build era → TxMintValue build era → Bool Source # | |
| Show (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody | |
Building vs viewing transactions
data BuildTxWith build a where Source #
Constructors
| ViewTx ∷ BuildTxWith ViewTx a | |
| BuildTxWith ∷ a → BuildTxWith BuildTx a |
Instances
| Eq a ⇒ Eq (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # (/=) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # | |
| Show a ⇒ Show (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody | |
Era-dependent transaction body features
data CollateralSupportedInEra era where Source #
A representation of whether the era supports transactions with inputs used only for collateral for script fees.
The Alonzo and subsequent eras support collateral inputs.
Constructors
| CollateralInAlonzoEra ∷ CollateralSupportedInEra AlonzoEra | |
| CollateralInBabbageEra ∷ CollateralSupportedInEra BabbageEra |
Instances
| Eq (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # (/=) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # | |
| Show (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| MultiAssetInMaryEra ∷ MultiAssetSupportedInEra MaryEra | Multi-asset transactions are supported in the |
| MultiAssetInAlonzoEra ∷ MultiAssetSupportedInEra AlonzoEra | Multi-asset transactions are supported in the |
| MultiAssetInBabbageEra ∷ MultiAssetSupportedInEra BabbageEra | Multi-asset transactions are supported in the |
Instances
| Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # | |
| Show (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
data OnlyAdaSupportedInEra era where Source #
A representation of whether the era supports only ada transactions.
Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.
This is the negation of MultiAssetSupportedInEra. It exists since we need
evidence to be positive.
Constructors
| AdaOnlyInByronEra ∷ OnlyAdaSupportedInEra ByronEra | |
| AdaOnlyInShelleyEra ∷ OnlyAdaSupportedInEra ShelleyEra | |
| AdaOnlyInAllegraEra ∷ OnlyAdaSupportedInEra AllegraEra |
Instances
| Eq (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool Source # (/=) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool Source # | |
| Show (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Byron era tx fees are implicit (as the difference bettween the sum of outputs and sum of inputs), but all later eras the fees are specified in the transaction explicitly.
Constructors
Instances
| Eq (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # | |
| Show (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxFeesImplicitInEra era where Source #
A representation of whether the era requires implicitly specified fees in transactions.
This is the negation of TxFeesExplicitInEra.
Constructors
| TxFeesImplicitInByronEra ∷ TxFeesImplicitInEra ByronEra |
Instances
| Eq (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # | |
| Show (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data ValidityUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with an upper bound on the range of slots in which they are valid.
The Shelley and subsequent eras support an upper bound on the validity range. In the Shelley era specifically it is actually required. It is optional in later eras.
Constructors
Instances
| Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool Source # | |
| Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data ValidityNoUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.
Note that the ShelleyEra does not support omitting a validity upper
bound. It was introduced as a required field in Shelley and then made
optional in Allegra and subsequent eras.
The Byron era supports this by virtue of the fact that it does not support validity ranges at all.
Constructors
Instances
| Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool Source # | |
| Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data ValidityLowerBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with a lower bound on the range of slots in which they are valid.
The Allegra and subsequent eras support an optional lower bound on the
validity range. No equivalent of ValidityNoUpperBoundSupportedInEra is
needed since all eras support having no lower bound.
Constructors
Instances
| Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool Source # | |
| Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Shelley era onwards.
Constructors
Instances
| Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # | |
| Show (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Allegra era onwards.
Constructors
Instances
| Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # | |
| Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data TxExtraKeyWitnessesSupportedInEra era where Source #
A representation of whether the era supports transactions that specify in the body that they need extra key witnesses, and where this fact is visible to scripts.
Extra key witnesses visible to scripts are supported from the Alonzo era onwards.
Constructors
| ExtraKeyWitnessesInAlonzoEra ∷ TxExtraKeyWitnessesSupportedInEra AlonzoEra | |
| ExtraKeyWitnessesInBabbageEra ∷ TxExtraKeyWitnessesSupportedInEra BabbageEra |
Instances
| Eq (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool Source # (/=) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool Source # | |
| Show (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data ScriptDataSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| ScriptDataInAlonzoEra ∷ ScriptDataSupportedInEra AlonzoEra | Script data is supported in transactions in the |
| ScriptDataInBabbageEra ∷ ScriptDataSupportedInEra BabbageEra |
Instances
| Eq (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # (/=) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # | |
| Show (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Shelley and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Constructors
Instances
| Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # | |
| Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificates embedded in
transactions.
The Shelley and subsequent eras support such certificates.
Constructors
Instances
| Eq (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # | |
| Show (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposals embedded in
transactions.
The Shelley and subsequent eras support such update proposals. They Byron era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Constructors
Instances
| Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # | |
| Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
data InlineDatumSupportedInEra era where Source #
Constructors
| InlineDatumSupportedInBabbageEra ∷ InlineDatumSupportedInEra Babbage |
Instances
| Eq (InlineDatumSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ InlineDatumSupportedInEra era → InlineDatumSupportedInEra era → Bool Source # (/=) ∷ InlineDatumSupportedInEra era → InlineDatumSupportedInEra era → Bool Source # | |
| Show (InlineDatumSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Feature availability functions
collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era) Source #
multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era) Source #
extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era) Source #
scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era) Source #
totalAndReturnCollateralSupportedInEra ∷ CardanoEra era → Maybe (TxTotalAndReturnCollateralSupportedInEra era) Source #
Fee calculation
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Lovelace |
Deprecated: Use evaluateTransactionFee instead
For a concrete fully-constructed transaction, determine the minimum fee that it needs to pay.
This function is simple, but if you are doing input selection then you probably want to consider estimateTransactionFee.
estimateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ NetworkId | |
| → Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Int | The number of extra UTxO transaction inputs |
| → Int | The number of extra transaction outputs |
| → Int | The number of extra Shelley key witnesses |
| → Int | The number of extra Byron key witnesses |
| → Lovelace |
This can estimate what the transaction fee will be, based on a starting base transaction, plus the numbers of the additional components of the transaction that may be added.
So for example with wallet coin selection, the base transaction should contain all the things not subject to coin selection (such as script inputs, metadata, withdrawals, certs etc)
evaluateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ ProtocolParameters | |
| → TxBody era | |
| → Word | The number of Shelley key witnesses |
| → Word | The number of Byron key witnesses |
| → Lovelace |
Compute the transaction fee for a proposed transaction, with the assumption that there will be the given number of key witnesses (i.e. signatures).
TODO: we need separate args for Shelley vs Byron key sigs
estimateTransactionKeyWitnessCount ∷ TxBodyContent BuildTx era → Word Source #
Give an approximate count of the number of key witnesses (i.e. signatures) a transaction will need.
This is an estimate not a precise count in that it can over-estimate: it makes conservative assumptions such as all inputs are from distinct addresses, but in principle multiple inputs can use the same address and we only need a witness per address.
Similarly there can be overlap between the regular and collateral inputs, but we conservatively assume they are distinct.
TODO: it is worth us considering a more precise count that relies on the UTxO to resolve which inputs are for distinct addresses, and also to count the number of Shelley vs Byron style witnesses.
Minimum required UTxO calculation
calculateMinimumUTxO ∷ ShelleyBasedEra era → TxOut CtxTx era → ProtocolParameters → Either MinimumUTxOError Value Source #
data MinimumUTxOError Source #
Instances
| Show MinimumUTxOError Source # | |
Defined in Cardano.Api.Fees | |
| Error MinimumUTxOError Source # | |
Defined in Cardano.Api.Fees Methods | |
Script execution units
evaluateTransactionExecutionUnits ∷ ∀ era mode. EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → UTxO era → TxBody era → Either TransactionValidityError (Map ScriptWitnessIndex (Either ScriptExecutionError ExecutionUnits)) Source #
Compute the ExecutionUnits needed for each script in the transaction.
This works by running all the scripts and counting how many execution units are actually used.
data ScriptExecutionError Source #
The different possible reasons that executing a script can fail,
as reported by evaluateTransactionExecutionUnits.
The first three of these are about failures before we even get to execute the script, and two are the result of execution.
Constructors
| ScriptErrorMissingTxIn TxIn | The script depends on a |
| ScriptErrorTxInWithoutDatum TxIn | The |
| ScriptErrorWrongDatum (Hash ScriptData) | The |
| ScriptErrorEvaluationFailed EvaluationError [Text] | The script evaluation failed. This usually means it evaluated to an
error value. This is not a case of running out of execution units
(which is not possible for |
| ScriptErrorExecutionUnitsOverflow | The execution units overflowed a 64bit word. Congratulations if you encounter this error. With the current style of cost model this would need a script to run for over 7 months, which is somewhat more than the expected maximum of a few milliseconds. |
| ScriptErrorNotPlutusWitnessedTxIn ScriptWitnessIndex | An attempt was made to spend a key witnessed tx input with a script witness. |
| ScriptErrorMissingScript RdmrPtr | A redeemer pointer points to a script that does not exist. |
| ScriptErrorMissingCostModel Language | A cost model was missing for a language which was used. |
Instances
| Show ScriptExecutionError Source # | |
Defined in Cardano.Api.Fees | |
| Error ScriptExecutionError Source # | |
Defined in Cardano.Api.Fees Methods | |
data TransactionValidityError Source #
Constructors
| TransactionValidityIntervalError PastHorizonException | The transaction validity interval is too far into the future. Transactions with Plutus scripts need to have a validity interval that is not so far in the future that we cannot reliably determine the UTC time corresponding to the validity interval expressed in slot numbers. This is because the Plutus scripts get given the transaction validity interval in UTC time, so that they are not sensitive to slot lengths. If either end of the validity interval is beyond the so called "time horizon" then the consensus algorithm is not able to reliably determine the relationship between slots and time. This is this situation in which this error is reported. For the Cardano mainnet the time horizon is 36 hours beyond the current time. This effectively means we cannot submit check or submit transactions that use Plutus scripts that have the end of their validity interval more than 36 hours into the future. |
| TransactionValidityBasicFailure (BasicFailure StandardCrypto) |
Instances
| Show TransactionValidityError Source # | |
Defined in Cardano.Api.Fees | |
| Error TransactionValidityError Source # | |
Defined in Cardano.Api.Fees Methods | |
Transaction balance
evaluateTransactionBalance ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → Set PoolId → UTxO era → TxBody era → TxOutValue era Source #
Compute the total balance of the proposed transaction. Ultimately a valid transaction must be fully balanced: that is have a total value of zero.
Finding the (non-zero) balance of partially constructed transaction is useful for adjusting a transaction to be fully balanced.
Building transactions with automated fees and balancing
makeTransactionBodyAutoBalance Source #
Arguments
| ∷ ∀ era mode. IsShelleyBasedEra era | |
| ⇒ EraInMode era mode | |
| → SystemStart | |
| → EraHistory mode | |
| → ProtocolParameters | |
| → Set PoolId | The set of registered stake pools |
| → UTxO era | Just the transaction inputs, not the entire |
| → TxBodyContent BuildTx era | |
| → AddressInEra era | Change address |
| → Maybe Word | Override key witnesses |
| → Either TxBodyErrorAutoBalance (BalancedTxBody era) |
This is much like makeTransactionBody but with greater automation to
calculate suitable values for several things.
In particular:
- It calculates the correct script
ExecutionUnits(ignoring the provided values, which can thus be zero). - It calculates the transaction fees, based on the script
ExecutionUnits, the currentProtocolParameters, and an estimate of the number of key witnesses (i.e. signatures). There is an override for the number of key witnesses. - It accepts a change address, calculates the balance of the transaction and puts the excess change into the change output.
- It also checks that the balance is positive and the change is above the minimum threshold.
To do this it needs more information than makeTransactionBody, all of
which can be queried from a local node.
data BalancedTxBody era Source #
Constructors
| BalancedTxBody | |
data TxBodyErrorAutoBalance Source #
The possible errors that can arise from makeTransactionBodyAutoBalance.
Constructors
| TxBodyError TxBodyError | The same errors that can arise from |
| TxBodyScriptExecutionError [(ScriptWitnessIndex, ScriptExecutionError)] | One or more of the scripts fails to execute correctly. |
| TxBodyScriptBadScriptValidity | One or more of the scripts were expected to fail validation, but none did. |
| TxBodyErrorAssetBalanceWrong Value | The balance of the non-ada assets is not zero. The |
| TxBodyErrorAdaBalanceNegative Lovelace | There is not enough ada to cover both the outputs and the fees. The transaction should be changed to provide more input ada, or otherwise adjusted to need less (e.g. outputs, script etc). |
| TxBodyErrorAdaBalanceTooSmall | Offending TxOut |
Fields
| |
| TxBodyErrorByronEraNotSupported |
|
| TxBodyErrorMissingParamMinUTxO | The |
| TxBodyErrorMissingParamCostPerWord | The |
| TxBodyErrorValidityInterval TransactionValidityError | The transaction validity interval is too far into the future.
See |
| TxBodyErrorMinUTxONotMet | Offending TxOut |
Fields
| |
| TxBodyErrorMinUTxOMissingPParams MinimumUTxOError | |
| TxBodyErrorNonAdaAssetsUnbalanced Value | |
Instances
| Show TxBodyErrorAutoBalance Source # | |
Defined in Cardano.Api.Fees | |
| Error TxBodyErrorAutoBalance Source # | |
Defined in Cardano.Api.Fees Methods | |
data TxScriptValidity era where Source #
A representation of whether the era supports tx script validity.
The Mary and subsequent eras support script validity.
Constructors
| TxScriptValidityNone ∷ TxScriptValidity era | |
| TxScriptValidity ∷ TxScriptValiditySupportedInEra era → ScriptValidity → TxScriptValidity era | Tx script validity is supported in transactions in the |
Instances
| Eq (TxScriptValidity era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # (/=) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # | |
| Show (TxScriptValidity era) Source # | |
Defined in Cardano.Api.TxBody | |
data ScriptValidity Source #
Indicates whether a script is expected to fail or pass validation.
Constructors
| ScriptInvalid | Script is expected to fail validation. Transactions marked as such can include scripts that fail validation. Such transactions may be submitted to the chain, in which case the collateral will be taken upon on chain script validation failure. |
| ScriptValid | Script is expected to pass validation. Transactions marked as such cannot include scripts that fail validation. |
Instances
| Eq ScriptValidity Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptValidity → ScriptValidity → Bool Source # (/=) ∷ ScriptValidity → ScriptValidity → Bool Source # | |
| Show ScriptValidity Source # | |
Defined in Cardano.Api.TxBody | |
| FromCBOR ScriptValidity Source # | |
Defined in Cardano.Api.TxBody | |
| ToCBOR ScriptValidity Source # | |
Defined in Cardano.Api.TxBody Methods toCBOR ∷ ScriptValidity → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScriptValidity → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScriptValidity] → Size # | |
data TxScriptValiditySupportedInEra era where Source #
Constructors
| TxScriptValiditySupportedInAlonzoEra ∷ TxScriptValiditySupportedInEra AlonzoEra | |
| TxScriptValiditySupportedInBabbageEra ∷ TxScriptValiditySupportedInEra BabbageEra |
Instances
| Eq (TxScriptValiditySupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # (/=) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # | |
| Show (TxScriptValiditySupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
scriptValidityToTxScriptValidity ∷ ShelleyBasedEra era → ScriptValidity → TxScriptValidity era Source #
txScriptValiditySupportedInShelleyBasedEra ∷ ShelleyBasedEra era → Maybe (TxScriptValiditySupportedInEra era) Source #
txScriptValiditySupportedInCardanoEra ∷ CardanoEra era → Maybe (TxScriptValiditySupportedInEra era) Source #
Signing transactions
Creating transaction witnesses one by one, or all in one go.
Bundled Patterns
| pattern Tx ∷ TxBody era → [KeyWitness era] → Tx era |
Instances
| Eq (Tx era) Source # | |
| Show (Tx era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (Tx era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods serialiseToCBOR ∷ Tx era → ByteString Source # deserialiseFromCBOR ∷ AsType (Tx era) → ByteString → Either DecoderError (Tx era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods textEnvelopeType ∷ AsType (Tx era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Tx era → TextEnvelopeDescr Source # | |
| data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx | |
getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era] Source #
Signing in one go
signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era Source #
Incremental signing and separate witnesses
makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era Source #
data KeyWitness era Source #
Instances
makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra Source #
data ShelleyWitnessSigningKey Source #
Constructors
makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era Source #
makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era Source #
Transaction metadata
Embedding additional structured data within transactions.
newtype TxMetadata Source #
Constructors
| TxMetadata (Map Word64 TxMetadataValue) |
Instances
Constructing metadata
data TxMetadataValue Source #
Constructors
| TxMetaMap [(TxMetadataValue, TxMetadataValue)] | |
| TxMetaList [TxMetadataValue] | |
| TxMetaNumber Integer | |
| TxMetaBytes ByteString | |
| TxMetaText Text |
Instances
| Eq TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Ord TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods compare ∷ TxMetadataValue → TxMetadataValue → Ordering Source # (<) ∷ TxMetadataValue → TxMetadataValue → Bool Source # (<=) ∷ TxMetadataValue → TxMetadataValue → Bool Source # (>) ∷ TxMetadataValue → TxMetadataValue → Bool Source # (>=) ∷ TxMetadataValue → TxMetadataValue → Bool Source # max ∷ TxMetadataValue → TxMetadataValue → TxMetadataValue Source # min ∷ TxMetadataValue → TxMetadataValue → TxMetadataValue Source # | |
| Show TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata | |
Validating metadata
validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] () Source #
Validate transaction metadata. This is for use with existing constructed metadata values, e.g. constructed manually or decoded from CBOR directly.
data TxMetadataRangeError Source #
An error in transaction metadata due to an out-of-range value.
Constructors
| TxMetadataNumberOutOfRange !Integer | The number is outside the maximum range of |
| TxMetadataTextTooLong !Int | The length of a text string metadatum value exceeds the maximum of 64 bytes as UTF8. |
| TxMetadataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataRangeError → TxMetadataRangeError → Bool Source # (/=) ∷ TxMetadataRangeError → TxMetadataRangeError → Bool Source # | |
| Show TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Error TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Conversion to/from JSON
data TxMetadataJsonSchema Source #
Tx metadata is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string.
We provide two different mappings between tx metadata and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into tx metadata. This does not require a specific JSON schema for the input. It does not expose the full representation capability of tx metadata.
- A mapping that exposes the full representation capability of tx metadata, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into tx metadata and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as tx metadata is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the tx metadata in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any tx metadata can be converted into the JSON and back without loss. That is we can round-trip the tx metadata via the JSON and also round-trip schema-compliant JSON via tx metadata.
Constructors
| TxMetadataJsonNoSchema | Use the "no schema" mapping between JSON and tx metadata as described above. |
| TxMetadataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and tx metadata as described above. |
Instances
| Eq TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataJsonSchema → TxMetadataJsonSchema → Bool Source # (/=) ∷ TxMetadataJsonSchema → TxMetadataJsonSchema → Bool Source # | |
| Show TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata | |
metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata Source #
Convert a value from JSON into tx metadata, using the given choice of mapping between JSON and tx metadata.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See TxMetadataJsonSchema for the details.
metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value Source #
Convert a tx metadata value into JSON , using the given choice of mapping between JSON and tx metadata.
This conversion is total but is not necessarily invertible.
See TxMetadataJsonSchema for the details.
metadataValueToJsonNoSchema ∷ TxMetadataValue → Value Source #
data TxMetadataJsonError Source #
Constructors
| TxMetadataJsonToplevelNotMap | |
| TxMetadataJsonToplevelBadKey !Text | |
| TxMetadataJsonSchemaError !Word64 !Value !TxMetadataJsonSchemaError | |
| TxMetadataRangeError !Word64 !Value !TxMetadataRangeError |
Instances
| Eq TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataJsonError → TxMetadataJsonError → Bool Source # (/=) ∷ TxMetadataJsonError → TxMetadataJsonError → Bool Source # | |
| Show TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Error TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
data TxMetadataJsonSchemaError Source #
Constructors
Instances
| Eq TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Show TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Error TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Certificates
data Certificate Source #
Constructors
Instances
Registering stake address and delegating
Certificates that are embedded in transactions for registering and unregistering stake address, and for setting the stake pool delegation choice for a stake address.
Registering stake pools
Certificates that are embedded in transactions for registering and retiring stake pools. This includes updating the stake pool parameters.
data StakePoolParameters Source #
Instances
| Eq StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods (==) ∷ StakePoolParameters → StakePoolParameters → Bool Source # (/=) ∷ StakePoolParameters → StakePoolParameters → Bool Source # | |
| Show StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate | |
data StakePoolRelay Source #
Instances
| Eq StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods (==) ∷ StakePoolRelay → StakePoolRelay → Bool Source # (/=) ∷ StakePoolRelay → StakePoolRelay → Bool Source # | |
| Show StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate | |
data StakePoolMetadataReference Source #
Instances
| Eq StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate | |
| Show StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate | |
Stake pool off-chain metadata
data StakePoolMetadata Source #
A representation of the required fields for off-chain stake pool metadata.
Instances
validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata) Source #
Decode and validate the provided JSON-encoded bytes as StakePoolMetadata.
Return the decoded metadata and the hash of the original bytes.
data StakePoolMetadataValidationError Source #
A stake pool metadata validation error.
Instances
Scripts
Both PaymentCredentials and StakeCredentials can use scripts.
Script languages
data SimpleScriptV1 Source #
The original simple script language which supports
- require a signature from a given key (by verification key hash)
- n-way and combinator
- n-way or combinator
- m-of-n combinator
This version of the language was introduced in the ShelleyEra.
Instances
| HasTypeProxy SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV1 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV1 → AsType SimpleScriptV1 Source # | |
| IsSimpleScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data SimpleScriptV2 Source #
The second version of the simple script language. It has all the features
of SimpleScriptV1 plus new atomic predicates:
- require the time be before a given slot number
- require the time be after a given slot number
This version of the language was introduced in the AllegraEra.
Instances
| HasTypeProxy SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV2 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV2 → AsType SimpleScriptV2 Source # | |
| IsSimpleScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data PlutusScriptV1 Source #
Place holder type to show what the pattern is to extend to multiple languages, not just multiple versions of a single language.
Instances
| HasTypeProxy PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType PlutusScriptV1 Source # Methods proxyToAsType ∷ Proxy PlutusScriptV1 → AsType PlutusScriptV1 Source # | |
| IsScriptLanguage PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data PlutusScriptV2 Source #
Instances
| HasTypeProxy PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType PlutusScriptV2 Source # Methods proxyToAsType ∷ Proxy PlutusScriptV2 → AsType PlutusScriptV2 Source # | |
| IsScriptLanguage PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data ScriptLanguage lang where Source #
Constructors
| SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang | |
| PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang |
Instances
| Eq (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool Source # (/=) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool Source # | |
| Show (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script | |
| TestEquality ScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). ScriptLanguage a → ScriptLanguage b → Maybe (a :~: b) Source # | |
data SimpleScriptVersion lang where Source #
Constructors
| SimpleScriptV1 ∷ SimpleScriptVersion SimpleScriptV1 | |
| SimpleScriptV2 ∷ SimpleScriptVersion SimpleScriptV2 |
Instances
| Eq (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool Source # (/=) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool Source # | |
| Show (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script | |
| TestEquality SimpleScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). SimpleScriptVersion a → SimpleScriptVersion b → Maybe (a :~: b) Source # | |
data PlutusScriptVersion lang where Source #
Constructors
| PlutusScriptV1 ∷ PlutusScriptVersion PlutusScriptV1 | |
| PlutusScriptV2 ∷ PlutusScriptVersion PlutusScriptV2 |
Instances
| Eq (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool Source # (/=) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool Source # | |
| Show (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script | |
| TestEquality PlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). PlutusScriptVersion a → PlutusScriptVersion b → Maybe (a :~: b) Source # | |
data AnyScriptLanguage where Source #
Constructors
| AnyScriptLanguage ∷ ScriptLanguage lang → AnyScriptLanguage |
Instances
data AnyPlutusScriptVersion where Source #
Constructors
| AnyPlutusScriptVersion ∷ PlutusScriptVersion lang → AnyPlutusScriptVersion |
Instances
class HasTypeProxy lang ⇒ IsScriptLanguage lang where Source #
Methods
scriptLanguage ∷ ScriptLanguage lang Source #
Instances
| IsScriptLanguage PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
Scripts in a specific language
data Script lang where Source #
A script in a particular language.
See also ScriptInAnyLang for a script in any of the known languages.
See also ScriptInEra for a script in a language that is available within
a particular era.
Note that some but not all scripts have an external JSON syntax, hence this
type has no JSON serialisation instances. The SimpleScript family of
languages do have a JSON syntax and thus have ToJSON/FromJSON instances.
Constructors
| SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang | |
| PlutusScript ∷ !(PlutusScriptVersion lang) → !(PlutusScript lang) → Script lang |
Instances
| Eq (Script lang) Source # | |
| Show (Script lang) Source # | |
| HasTypeProxy lang ⇒ HasTypeProxy (Script lang) Source # | |
| IsScriptLanguage lang ⇒ SerialiseAsCBOR (Script lang) Source # | |
Defined in Cardano.Api.Script Methods serialiseToCBOR ∷ Script lang → ByteString Source # deserialiseFromCBOR ∷ AsType (Script lang) → ByteString → Either DecoderError (Script lang) Source # | |
| IsScriptLanguage lang ⇒ HasTextEnvelope (Script lang) Source # | |
Defined in Cardano.Api.Script Methods textEnvelopeType ∷ AsType (Script lang) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Script lang → TextEnvelopeDescr Source # | |
| data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
Scripts in any language
data ScriptInAnyLang where Source #
Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.
Use toScriptInEra to convert to a script in the context of an era.
Constructors
| ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang |
Instances
| Eq ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods | |
| Show ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
| FromJSON ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods parseJSON ∷ Value → Parser ScriptInAnyLang # parseJSONList ∷ Value → Parser [ScriptInAnyLang] # | |
| ToJSON ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInAnyLang → Value # toEncoding ∷ ScriptInAnyLang → Encoding # toJSONList ∷ [ScriptInAnyLang] → Value # toEncodingList ∷ [ScriptInAnyLang] → Encoding # | |
| HasTypeProxy ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Associated Types data AsType ScriptInAnyLang Source # Methods proxyToAsType ∷ Proxy ScriptInAnyLang → AsType ScriptInAnyLang Source # | |
| data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
toScriptInAnyLang ∷ Script lang → ScriptInAnyLang Source #
Convert a script in a specific statically-known language to a
ScriptInAnyLang.
No inverse to this is provided, just do case analysis on the ScriptLanguage
field within the ScriptInAnyLang constructor.
Scripts in a specific era
data ScriptInEra era where Source #
Constructors
| ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era |
Instances
| Eq (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptInEra era → ScriptInEra era → Bool Source # (/=) ∷ ScriptInEra era → ScriptInEra era → Bool Source # | |
| Show (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
| HasTypeProxy era ⇒ HasTypeProxy (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Associated Types data AsType (ScriptInEra era) Source # Methods proxyToAsType ∷ Proxy (ScriptInEra era) → AsType (ScriptInEra era) Source # | |
| data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era) Source #
Given a target era and a script in some language, check if the language is
supported in that era, and if so return a ScriptInEra.
eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era Source #
Use of a script in an era as a witness
data WitCtxTxIn Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness a transaction input.
data WitCtxMint Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness minting.
data WitCtxStake Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness the use of stake addresses in both certificates and withdrawals.
data WitCtx witctx where Source #
This GADT provides a value-level representation of all the witness contexts. This enables pattern matching on the context to allow them to be treated in a non-uniform way.
Constructors
| WitCtxTxIn ∷ WitCtx WitCtxTxIn | |
| WitCtxMint ∷ WitCtx WitCtxMint | |
| WitCtxStake ∷ WitCtx WitCtxStake |
data ScriptWitness witctx era where Source #
A use of a script within a transaction body to witness that something is being used in an authorised manner. That can be
- spending a transaction input
- minting tokens
- using a certificate (stake address certs specifically)
- withdrawing from a reward account
For simple script languages, the use of the script is the same in all contexts. For Plutus scripts, using a script involves supplying a redeemer. In addition, Plutus scripts used for spending inputs must also supply the datum value used when originally creating the TxOut that is now being spent.
Constructors
| SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era | |
| PlutusScriptWitness ∷ ScriptLanguageInEra lang era → PlutusScriptVersion lang → PlutusScript lang → ScriptDatum witctx → ScriptRedeemer → ExecutionUnits → ScriptWitness witctx era |
Instances
| Eq (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool Source # (/=) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool Source # | |
| Show (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script | |
data Witness witctx era where Source #
Constructors
| KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era | |
| ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era |
data KeyWitnessInCtx witctx where Source #
Constructors
| KeyWitnessForSpending ∷ KeyWitnessInCtx WitCtxTxIn | |
| KeyWitnessForStakeAddr ∷ KeyWitnessInCtx WitCtxStake |
Instances
| Eq (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool Source # (/=) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool Source # | |
| Show (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script | |
data ScriptWitnessInCtx witctx where Source #
Constructors
| ScriptWitnessForSpending ∷ ScriptWitnessInCtx WitCtxTxIn | |
| ScriptWitnessForMinting ∷ ScriptWitnessInCtx WitCtxMint | |
| ScriptWitnessForStakeAddr ∷ ScriptWitnessInCtx WitCtxStake |
Instances
| Eq (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool Source # (/=) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool Source # | |
| Show (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script | |
data ScriptDatum witctx where Source #
Constructors
| ScriptDatumForTxIn ∷ ScriptData → ScriptDatum WitCtxTxIn | |
| NoScriptDatumForMint ∷ ScriptDatum WitCtxMint | |
| NoScriptDatumForStake ∷ ScriptDatum WitCtxStake |
Instances
| Eq (ScriptDatum witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptDatum witctx → ScriptDatum witctx → Bool Source # (/=) ∷ ScriptDatum witctx → ScriptDatum witctx → Bool Source # | |
| Show (ScriptDatum witctx) Source # | |
Defined in Cardano.Api.Script | |
type ScriptRedeemer = ScriptData Source #
scriptWitnessScript ∷ ScriptWitness witctx era → ScriptInEra era Source #
Inspecting ScriptWitnesses
data AnyScriptWitness era where Source #
A ScriptWitness in any WitCtx. This lets us handle heterogeneous
collections of script witnesses from multiple contexts.
Constructors
| AnyScriptWitness ∷ ScriptWitness witctx era → AnyScriptWitness era |
data ScriptWitnessIndex Source #
Identify the location of a ScriptWitness within the context of a
TxBody. These are indexes of the objects within the transaction that
need or can use script witnesses: inputs, minted assets, withdrawals and
certificates. These are simple numeric indices, enumerated from zero.
Thus the indices are not stable if the transaction body is modified.
Constructors
| ScriptWitnessIndexTxIn !Word | The n'th transaction input, in the order of the |
| ScriptWitnessIndexMint !Word | |
| ScriptWitnessIndexCertificate !Word | The n'th certificate, in the list order of the certificates. |
| ScriptWitnessIndexWithdrawal !Word | The n'th withdrawal, in the order of the |
Instances
| Eq ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (/=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # | |
| Ord ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody Methods compare ∷ ScriptWitnessIndex → ScriptWitnessIndex → Ordering Source # (<) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (<=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (>) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (>=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # max ∷ ScriptWitnessIndex → ScriptWitnessIndex → ScriptWitnessIndex Source # min ∷ ScriptWitnessIndex → ScriptWitnessIndex → ScriptWitnessIndex Source # | |
| Show ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody | |
collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)] Source #
mapTxScriptWitnesses ∷ ∀ era. (∀ witctx. ScriptWitnessIndex → ScriptWitness witctx era → ScriptWitness witctx era) → TxBodyContent BuildTx era → TxBodyContent BuildTx era Source #
Languages supported in each era
data ScriptLanguageInEra lang era where Source #
Constructors
Instances
| Eq (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool Source # (/=) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool Source # | |
| Show (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script | |
| ToJSON (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptLanguageInEra lang era → Value # toEncoding ∷ ScriptLanguageInEra lang era → Encoding # toJSONList ∷ [ScriptLanguageInEra lang era] → Value # toEncodingList ∷ [ScriptLanguageInEra lang era] → Encoding # | |
scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era) Source #
Check if a given script language is supported in a given era, and if so return the evidence.
languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang Source #
eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era Source #
Simple scripts
Making multi-signature and time-lock scripts.
data SimpleScript lang where Source #
Constructors
| RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang | |
| RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang |
Instances
data TimeLocksSupported lang where Source #
Time lock feature in the SimpleScript language.
The constructors of this type serve as evidence that the timelocks feature is supported in particular versions of the language.
Constructors
| TimeLocksInSimpleScriptV2 ∷ TimeLocksSupported SimpleScriptV2 |
Instances
| Eq (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool Source # (/=) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool Source # | |
| Show (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script | |
timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang) Source #
adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang') Source #
Try converting the SimpleScript into a different version of the language.
This will work when the script only uses the features of the target language
version. For example converting from SimpleScriptV2 to SimpleScriptV1
will work if the script happens not to use time locks feature. On the other
hand converting SimpleScriptV1 to SimpleScriptV2 will always work because
it is backwards compatible.
Plutus scripts
data PlutusScript lang Source #
Plutus scripts.
Note that Plutus scripts have a binary serialisation but no JSON serialisation.
Instances
examplePlutusScriptAlwaysSucceeds ∷ WitCtx witctx → PlutusScript PlutusScriptV1 Source #
An example Plutus script that always succeeds, irrespective of inputs.
For example, if one were to use this for a payment address then it would allow anyone to spend from it.
The exact script depends on the context in which it is to be used.
examplePlutusScriptAlwaysFails ∷ WitCtx witctx → PlutusScript PlutusScriptV1 Source #
An example Plutus script that always fails, irrespective of inputs.
For example, if one were to use this for a payment address then it would be impossible for anyone to ever spend from it.
The exact script depends on the context in which it is to be used.
Script data
data ScriptData Source #
Constructors
| ScriptDataConstructor | |
Fields
| |
| ScriptDataMap [(ScriptData, ScriptData)] | Key value pairs |
| ScriptDataList [ScriptData] | Elements |
| ScriptDataNumber Integer | |
| ScriptDataBytes ByteString | |
Instances
Validation
data ScriptDataRangeError Source #
An error in script data due to an out-of-range value.
Constructors
| ScriptDataNumberOutOfRange !Integer | The number is outside the maximum range of |
| ScriptDataConstructorOutOfRange !Integer | The number is outside the maximum range of |
| ScriptDataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData Methods (==) ∷ ScriptDataRangeError → ScriptDataRangeError → Bool Source # (/=) ∷ ScriptDataRangeError → ScriptDataRangeError → Bool Source # | |
| Show ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData | |
| Error ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
validateScriptData ∷ ScriptData → Either ScriptDataRangeError () Source #
Validate script data. This is for use with existing constructed script data values, e.g. constructed manually or decoded from CBOR directly.
Conversion to/from JSON
data ScriptDataJsonSchema Source #
Script data is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string. It also supports alternatives / tagged unions, used for representing constructors for Plutus data values.
We provide two different mappings between script data and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into script data. This does not require a specific JSON schema for the input. It does not expose the full representation capability of script data.
- A mapping that exposes the full representation capability of script data, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into script data and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as script data is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the script data in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any script data can be converted into the JSON and back without loss. That is we can round-trip the script data via the JSON and also round-trip schema-compliant JSON via script data.
Constructors
| ScriptDataJsonNoSchema | Use the "no schema" mapping between JSON and script data as described above. |
| ScriptDataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and script data as described above. |
Instances
| Eq ScriptDataJsonSchema Source # | |
Defined in Cardano.Api.ScriptData Methods (==) ∷ ScriptDataJsonSchema → ScriptDataJsonSchema → Bool Source # (/=) ∷ ScriptDataJsonSchema → ScriptDataJsonSchema → Bool Source # | |
| Show ScriptDataJsonSchema Source # | |
Defined in Cardano.Api.ScriptData | |
scriptDataFromJson ∷ ScriptDataJsonSchema → Value → Either ScriptDataJsonError ScriptData Source #
Convert a value from JSON into script data, using the given choice of mapping between JSON and script data.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See ScriptDataJsonSchema for the details.
scriptDataToJson ∷ ScriptDataJsonSchema → ScriptData → Value Source #
Convert a script data value into JSON , using the given choice of mapping between JSON and script data.
This conversion is total but is not necessarily invertible.
See ScriptDataJsonSchema for the details.
data ScriptDataJsonError Source #
Constructors
| ScriptDataJsonSchemaError !Value !ScriptDataJsonSchemaError | |
| ScriptDataRangeError !Value !ScriptDataRangeError |
Instances
| Eq ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData Methods (==) ∷ ScriptDataJsonError → ScriptDataJsonError → Bool Source # (/=) ∷ ScriptDataJsonError → ScriptDataJsonError → Bool Source # | |
| Show ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData | |
| Error ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
data ScriptDataJsonSchemaError Source #
Constructors
Instances
| Eq ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData | |
| Show ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData | |
| Error ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
Script execution units
data ExecutionUnits Source #
The units for how long a script executes for and how much memory it uses. This is used to declare the resources used by a particular use of a script.
This type is also used to describe the limits for the maximum overall execution units per transaction or per block.
Constructors
| ExecutionUnits | |
Fields
| |
Instances
| Eq ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ExecutionUnits → ExecutionUnits → Bool Source # (/=) ∷ ExecutionUnits → ExecutionUnits → Bool Source # | |
| Show ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| FromJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| ToJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ExecutionUnits → Value # toEncoding ∷ ExecutionUnits → Encoding # toJSONList ∷ [ExecutionUnits] → Value # toEncodingList ∷ [ExecutionUnits] → Encoding # | |
| FromCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| ToCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toCBOR ∷ ExecutionUnits → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ExecutionUnits → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ExecutionUnits] → Size # | |
data ExecutionUnitPrices Source #
The prices for ExecutionUnits as a fraction of a Lovelace.
These are used to determine the fee for the use of a script within a
transaction, based on the ExecutionUnits needed by the use of the script.
Constructors
| ExecutionUnitPrices | |
Instances
Instances
| Eq CostModel Source # | |
| Show CostModel Source # | |
| FromJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| ToJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toEncoding ∷ CostModel → Encoding # toJSONList ∷ [CostModel] → Value # toEncodingList ∷ [CostModel] → Encoding # | |
| FromCBOR CostModel Source # | |
| ToCBOR CostModel Source # | |
validateCostModel ∷ PlutusScriptVersion lang → CostModel → Either InvalidCostModel () Source #
Script addresses
Making addresses from scripts.
data ScriptHash Source #
We have this type separate from the Hash type to avoid the script
hash type being parametrised by the era. The representation is era
independent, and there are many places where we want to use a script
hash where we don't want things to be era-parametrised.
Instances
hashScript ∷ Script lang → ScriptHash Source #
Serialisation
Support for serialising data in JSON, CBOR and text files.
CBOR
class HasTypeProxy a ⇒ SerialiseAsCBOR a Source #
Instances
Minimal complete definition
Instances
class Typeable a ⇒ FromCBOR a #
Minimal complete definition
Instances
| FromCBOR Bool | |
| FromCBOR Float | |
| FromCBOR Int | |
| FromCBOR Int32 | |
| FromCBOR Int64 | |
| FromCBOR Integer | |
| FromCBOR Natural | |
| FromCBOR Word | |
| FromCBOR Word8 | |
| FromCBOR Word16 | |
| FromCBOR Word32 | |
| FromCBOR Word64 | |
| FromCBOR () | |
| FromCBOR ByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR ShortByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR Nano | |
| FromCBOR Pico | |
| FromCBOR Void | |
| FromCBOR Text | |
| FromCBOR UTCTime | |
| FromCBOR NominalDiffTime | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR BlockNo | |
| FromCBOR LByteString | |
| FromCBOR EpochNo | |
| FromCBOR EpochSize | |
| FromCBOR SlotNo | |
| FromCBOR Raw | |
| FromCBOR NonNegativeInterval | |
| FromCBOR UnitInterval | |
| FromCBOR ProtVer | |
| FromCBOR AlonzoGenesis | |
| FromCBOR Coin | |
| FromCBOR AssetName | |
| FromCBOR Prices | |
| FromCBOR Language | |
| FromCBOR SystemStart | |
Defined in Cardano.Slotting.Time | |
| FromCBOR TranslationError | |
| FromCBOR ValidityInterval | |
| FromCBOR Metadatum | |
| FromCBOR ExUnits | |
| FromCBOR Likelihood | |
| FromCBOR Ptr | |
| FromCBOR Desirability | |
| FromCBOR StakePoolRelay | |
| FromCBOR PoolMetadata | |
| FromCBOR Network | |
| FromCBOR Nonce | |
| FromCBOR IsValid | |
| FromCBOR VotingPeriod | |
| FromCBOR AccountState | |
| FromCBOR TxIx | |
| FromCBOR MIRPot | |
| FromCBOR Tag | |
| FromCBOR RdmrPtr | |
| FromCBOR Url | |
| FromCBOR DeltaCoin | |
| FromCBOR Port | |
| FromCBOR DnsName | |
| FromCBOR ActiveSlotCoeff | |
| FromCBOR CertIx | |
| FromCBOR PositiveInterval | |
| FromCBOR PositiveUnitInterval | |
| FromCBOR LogWeight | |
| FromCBOR TagMismatchDescription | |
| FromCBOR FailureDescription | |
| FromCBOR TicknState | |
| FromCBOR KESPeriod | |
| FromCBOR ByronHash | |
| FromCBOR EpochAndSlotCount | |
| FromCBOR EpochNumber | |
| FromCBOR EpochSlots | |
Defined in Cardano.Chain.Slotting.EpochSlots | |
| FromCBOR SlotCount | |
| FromCBOR SlotNumber | |
| FromCBOR Config | |
| FromCBOR GenesisNonAvvmBalances | |
| FromCBOR GenesisDelegation | |
| FromCBOR GenesisKeyHashes | |
| FromCBOR CompactAddress | |
| FromCBOR RequiresNetworkMagic | |
| FromCBOR GenesisAvvmBalances | |
| FromCBOR ProtocolParameters | |
| FromCBOR ProtocolVersion | |
| FromCBOR ProtocolMagicId | |
| FromCBOR Certificate | |
| FromCBOR SigningKey | |
| FromCBOR SoftwareVersion | |
| FromCBOR CompactRedeemVerificationKey | |
| FromCBOR Lovelace | |
| FromCBOR Error | |
| FromCBOR ChainValidationState | |
| FromCBOR VerificationKey | |
| FromCBOR KeyHash | |
| FromCBOR GenesisHash | |
| FromCBOR CandidateProtocolUpdate | |
| FromCBOR Endorsement | |
| FromCBOR ApplyMempoolPayloadErr | |
Defined in Cardano.Chain.Byron.API.Mempool | |
| FromCBOR Tx | |
| FromCBOR Proposal | |
| FromCBOR Vote | |
| FromCBOR Map | |
| FromCBOR ScheduledDelegation | |
| FromCBOR State | |
| FromCBOR UTxO | |
| FromCBOR ToSign | |
| FromCBOR RewardParams | |
| FromCBOR RewardInfoPool | |
| FromCBOR Point | |
| FromCBOR Proof | |
| FromCBOR SignKey | |
| FromCBOR VerKey | |
| FromCBOR RedeemVerificationKey | |
| FromCBOR RedeemSigningKey | |
| FromCBOR ScriptResult | |
| FromCBOR PlutusDebug | |
| FromCBOR ChainDifficulty | |
| FromCBOR Proof | |
| FromCBOR SscPayload | |
| FromCBOR ProposalBody | |
| FromCBOR TxInWitness | |
| FromCBOR Body | |
| FromCBOR TxPayload | |
| FromCBOR Payload | |
| FromCBOR Payload | |
| FromCBOR BlockSignature | |
| FromCBOR TxProof | |
| FromCBOR SscProof | |
| FromCBOR CompactTxIn | |
| FromCBOR CompactTxOut | |
| FromCBOR State | |
| FromCBOR UTxOValidationError | |
| FromCBOR BlockCount | |
| FromCBOR UTxOConfiguration | |
| FromCBOR ApplicationName | |
| FromCBOR ApplicationVersion | |
| FromCBOR ProtocolUpdateProposal | |
| FromCBOR SoftwareUpdateProposal | |
| FromCBOR Error | |
| FromCBOR HDAddressPayload | |
| FromCBOR NetworkMagic | |
| FromCBOR AddrSpendingData | |
| FromCBOR AddrType | |
| FromCBOR Address | |
| FromCBOR Address' | |
| FromCBOR LovelaceError | |
| FromCBOR LovelacePortion | |
| FromCBOR TxFeePolicy | |
| FromCBOR TxSizeLinear | |
| FromCBOR State | |
| FromCBOR State | |
| FromCBOR GenesisData | |
| FromCBOR CompactTxId | |
| FromCBOR TxIn | |
| FromCBOR TxOut | |
| FromCBOR TxAux | |
| FromCBOR TxSigData | |
| FromCBOR UTxOError | |
| FromCBOR ApplicationNameError | |
| FromCBOR InstallerHash | |
| FromCBOR SystemTag | |
| FromCBOR ProtocolParametersUpdate | |
| FromCBOR SoftforkRule | |
| FromCBOR SoftwareVersionError | |
| FromCBOR SystemTagError | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Adopted | |
| FromCBOR ChainCode | |
| FromCBOR PerformanceEstimate | |
| FromCBOR RewardType | |
| FromCBOR TxValidationError | |
| FromCBOR ScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
| FromCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| FromCBOR AnyPlutusScriptVersion Source # | |
Defined in Cardano.Api.Script | |
| FromCBOR Lovelace Source # | |
| FromCBOR UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR CostModel Source # | |
| FromCBOR ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods fromCBOR ∷ Decoder s ProtocolParametersUpdate # | |
| FromCBOR Certificate Source # | |
Defined in Cardano.Api.Certificate | |
| FromCBOR ScriptValidity Source # | |
Defined in Cardano.Api.TxBody | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| FromCBOR OperationalCertificate Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR a ⇒ FromCBOR [a] | |
| FromCBOR a ⇒ FromCBOR (Maybe a) | |
| (Integral a, FromCBOR a) ⇒ FromCBOR (Ratio a) | |
| (Ord a, FromCBOR a) ⇒ FromCBOR (Set a) | |
| FromCBOR a ⇒ FromCBOR (NonEmpty a) | |
| (Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) | |
| FromCBOR a ⇒ FromCBOR (Vector a) | |
| (Era era, FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Witnesses era)), ValidateScript era, Script era ~ Script era) ⇒ FromCBOR (Annotator (ValidatedTx era)) | |
| (Era era, Ord (Script era), FromCBOR (Annotator (Script era)), Script era ~ Script era) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| (Crypto (Crypto era), Typeable (Crypto era), Typeable era) ⇒ FromCBOR (Annotator (Script era)) | |
| (FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Script era)), FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (Witnesses era)), ToCBOR (AuxiliaryData era), ToCBOR (Script era), ToCBOR (TxBody era), ToCBOR (Witnesses era), ValidateScript era, Script era ~ Script era, Era era) ⇒ FromCBOR (Annotator (TxSeq era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), SerialisableData (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBody era)) | |
| (Era era, ValidateScript era, Script era ~ Script era) ⇒ FromCBOR (Annotator (TxWitness era)) | |
| (BlockAnn era, Typeable era) ⇒ FromCBOR (Annotator (TxSeq era)) | |
| (Typeable era, FromCBOR (Annotator (Script era)), ValidateScript era) ⇒ FromCBOR (Annotator (WitnessSetHKD Identity era)) | |
| (Era era, FromCBOR (TxOut era), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBody era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (Timelock crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBody era)) | |
| (Era era, FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Witnesses era))) ⇒ FromCBOR (Annotator (Tx era)) | |
| (Typeable t, FromCBOR (Annotator t)) ⇒ FromCBOR (Annotator (MemoBytes t)) | |
| (Era era, ToCBOR (Data era), ToCBOR (Script era), Typeable (Script era), ValidateScript era, Script era ~ Script era) ⇒ FromCBOR (Annotator (TxWitnessRaw era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), SerialisableData (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBody era)) | |
| (BlockAnn era, ValidateScript era, SupportsSegWit era, FromCBOR (Annotator (TxSeq era)), FromCBOR (Annotator h), Typeable h) ⇒ FromCBOR (Annotator (Block h era)) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Annotator (WitVKey kr crypto)) | |
| Era era ⇒ FromCBOR (Annotator (Redeemers era)) | |
| Typeable era ⇒ FromCBOR (Annotator (Data era)) | |
| (Era era, Ord (Script era), FromCBOR (Annotator (Script era)), Script era ~ Script era) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (TimelockRaw crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| (Typeable era, Era era) ⇒ FromCBOR (Annotator (TxDatsRaw era)) | |
| Era era ⇒ FromCBOR (Annotator (TxDats era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BootstrapWitness crypto)) | |
| Typeable era ⇒ FromCBOR (Annotator (Metadata era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSig crypto)) | |
| Era era ⇒ FromCBOR (Annotator (RedeemersRaw era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| (Era era, FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Witnesses era))) ⇒ FromCBOR (Annotator (TxRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSigRaw crypto)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| (TransTxBody FromCBOR era, ToCBOR (PParamsDelta era), Era era) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BHeader crypto)) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (Header (ShelleyBlock era))) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (ShelleyBlock era)) | |
| FromCBOR (SigDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SigDSIGN Ed25519Bip32DSIGN) # | |
| FromCBOR (SigDSIGN MockDSIGN) | |
| FromCBOR (SigDSIGN EcdsaSecp256k1DSIGN) | |
| FromCBOR (SigDSIGN Ed25519DSIGN) | |
| FromCBOR (SigDSIGN Ed448DSIGN) | |
| FromCBOR (SigDSIGN SchnorrSecp256k1DSIGN) | |
| FromCBOR (SignKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock Methods fromCBOR ∷ Decoder s (SignKeyDSIGN MockDSIGN) # label ∷ Proxy (SignKeyDSIGN MockDSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN EcdsaSecp256k1DSIGN) | |
Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN EcdsaSecp256k1DSIGN) # label ∷ Proxy (SignKeyDSIGN EcdsaSecp256k1DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed448DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed448DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN SchnorrSecp256k1DSIGN) | |
Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN SchnorrSecp256k1DSIGN) # label ∷ Proxy (SignKeyDSIGN SchnorrSecp256k1DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock | |
| FromCBOR (VerKeyDSIGN EcdsaSecp256k1DSIGN) | |
Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN EcdsaSecp256k1DSIGN) # label ∷ Proxy (VerKeyDSIGN EcdsaSecp256k1DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed448DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed448DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN SchnorrSecp256k1DSIGN) | |
Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN SchnorrSecp256k1DSIGN) # label ∷ Proxy (VerKeyDSIGN SchnorrSecp256k1DSIGN) → Text # | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (PPUPState era) | |
| FromCBOR a ⇒ FromCBOR (StrictMaybe a) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (ApplyTxError era) | |
| Crypto crypto ⇒ FromCBOR (Value crypto) | |
| (FromCBOR (PredicateFailure (EraRule "DELEGS" era)), FromCBOR (PredicateFailure (EraRule "UTXOW" era)), Era era) ⇒ FromCBOR (LedgerPredicateFailure era) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| Era era ⇒ FromCBOR (PParams era) | |
| (Era era, TransTxOut DecodeNonNegative era, Show (Value era)) ⇒ FromCBOR (TxOut era) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| Era era ⇒ FromCBOR (PParams era) | |
| Crypto crypto ⇒ FromCBOR (ScriptHash crypto) | |
| Crypto crypto ⇒ FromCBOR (AuxiliaryDataHash crypto) | |
| Crypto crypto ⇒ FromCBOR (PolicyID crypto) | |
| (Era era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (Annotator (Script era)), Compactible (Value era)) ⇒ FromCBOR (TxOut era) | |
| (Era era, FromCBOR (PParams era), FromSharedCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking (Crypto era)), FromCBOR (Value era), FromCBOR (State (EraRule "PPUP" era))) ⇒ FromCBOR (NewEpochState era) | |
| Crypto crypto ⇒ FromCBOR (DCert crypto) | |
| Crypto crypto ⇒ FromCBOR (Wdrl crypto) | |
| Crypto crypto ⇒ FromCBOR (TxIn crypto) | |
| (FromCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |
| Era era ⇒ FromCBOR (ShelleyGenesis era) | |
Defined in Cardano.Ledger.Shelley.Genesis | |
| Crypto crypto ⇒ FromCBOR (Addr crypto) | |
| Crypto crypto ⇒ FromCBOR (CompactAddr crypto) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| Crypto crypto ⇒ FromCBOR (CompactForm (Value crypto)) | |
| FromCBOR (CompactForm Coin) | |
| FromCBOR (CompactForm DeltaCoin) | |
| Era era ⇒ FromCBOR (PParams era) | |
| (FromCBOR (PParams era), TransValue FromCBOR era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), FromSharedCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking (Crypto era)), FromCBOR (State (EraRule "PPUP" era)), Era era) ⇒ FromCBOR (EpochState era) | |
| Crypto crypto ⇒ FromCBOR (BlocksMade crypto) | |
| Crypto crypto ⇒ FromCBOR (PulsingRewUpdate crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolDistr crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (ProposedPPUpdates era) | |
| Crypto crypto ⇒ FromCBOR (GenDelegPair crypto) | |
| Crypto crypto ⇒ FromCBOR (ShelleyGenesisStaking crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (Update era) | |
| (Era era, DecodeNonNegative (Value era), Show (Value era), Compactible (Value era)) ⇒ FromCBOR (TxOut era) | |
| Crypto crypto ⇒ FromCBOR (PoolParams crypto) | |
| Crypto crypto ⇒ FromCBOR (FutureGenDeleg crypto) | |
| Crypto crypto ⇒ FromCBOR (IndividualPoolStake crypto) | |
| Typeable era ⇒ FromCBOR (BinaryData era) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenance crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenancePool crypto) | |
| FromCBOR (VerKeyVRF PraosVRF) | |
| FromCBOR (VerKeyVRF MockVRF) | |
| FromCBOR (VerKeyVRF SimpleVRF) | |
| Crypto crypto ⇒ FromCBOR (RewardAcnt crypto) | |
| (Era era, Typeable era, FromCBOR (TxOut era), FromCBOR (Value era), FromCBOR (PredicateFailure (EraRule "UTXOS" era)), FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (BabbageUtxoPred era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "DELPL" era)), Typeable (Script era)) ⇒ FromCBOR (DelegsPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxosPredicateFailure era) | |
| (Era era, FromCBOR (TxOut era), FromCBOR (Value era), FromCBOR (PredicateFailure (EraRule "UTXOS" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (UtxowPredicateFail era) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (UtxowPredicateFailure era) | |
| Era era ⇒ FromCBOR (PpupPredicateFailure era) | |
| Era era ⇒ FromCBOR (Datum era) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (TxBodyRaw era) | |
| Crypto crypto ⇒ FromCBOR (Reward crypto) | |
| Crypto crypto ⇒ FromCBOR (GenDelegs crypto) | |
| Era era ⇒ FromCBOR (PoolPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (RewardUpdate crypto) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (LedgersPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "POOL" era)), FromCBOR (PredicateFailure (EraRule "DELEG" era)), Typeable (Script era)) ⇒ FromCBOR (DelplPredicateFailure era) | |
| (Era era, Typeable (Script era)) ⇒ FromCBOR (DelegPredicateFailure era) | |
| (Typeable era, FromCBOR (BbodyPredicateFailure era)) ⇒ FromCBOR (AlonzoBbodyPredFail era) | |
| (Typeable c, Crypto c) ⇒ FromCBOR (ScriptPurpose c) | |
| Crypto crypto ⇒ FromCBOR (CompactValue crypto) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (TxBodyRaw era) | |
| Crypto crypto ⇒ FromCBOR (TxId crypto) | |
| FamsFrom era ⇒ FromCBOR (TxBodyRaw era) | |
| Crypto crypto ⇒ FromCBOR (MIRCert crypto) | |
| Crypto crypto ⇒ FromCBOR (MIRTarget crypto) | |
| Crypto crypto ⇒ FromCBOR (StakeCreds crypto) | |
| (FromCBOR (TxOut era), Era era, FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (TxBodyRaw era) | |
| (FromCBORGroup a, ToCBORGroup a) ⇒ FromCBOR (CBORGroup a) | |
| Typeable v ⇒ FromCBOR (OutputVRF v) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SignKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SignKeyKES (SumKES h d)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SignKeyKES (CompactSingleKES d)) | |
| (OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SignKeyKES (CompactSumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SignKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SignKeyKES (SimpleKES d t)) | |
| FromCBOR (SignKeyVRF PraosVRF) | |
| FromCBOR (SignKeyVRF MockVRF) | |
| FromCBOR (SignKeyVRF SimpleVRF) | |
| DSIGNAlgorithm d ⇒ FromCBOR (VerKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (VerKeyKES (SumKES h d)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (VerKeyKES (CompactSingleKES d)) | |
| (OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (VerKeyKES (CompactSumKES h d)) | |
| KnownNat t ⇒ FromCBOR (VerKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (VerKeyKES (SimpleKES d t)) | |
| Crypto crypto ⇒ FromCBOR (RewardSnapShot crypto) | |
| Crypto c ⇒ FromCBOR (RewardAns c) | |
| Crypto crypto ⇒ FromCBOR (CollectError crypto) | |
| Crypto crypto ⇒ FromCBOR (ChainDepState crypto) | |
| Crypto crypto ⇒ FromCBOR (PrtclState crypto) | |
| Crypto crypto ⇒ FromCBOR (BHBody crypto) | |
| Crypto crypto ⇒ FromCBOR (HashHeader crypto) | |
| Crypto crypto ⇒ FromCBOR (LastAppliedBlock crypto) | |
| Crypto crypto ⇒ FromCBOR (PrevHash crypto) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SigKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SigKES (SumKES h d)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SigKES (CompactSingleKES d)) | |
| (OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SigKES (CompactSumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SigKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SigKES (SimpleKES d t)) | |
| Crypto crypto ⇒ FromCBOR (OBftSlot crypto) | |
| FromCBOR (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisDelegateExtendedKey) # | |
| FromCBOR (Hash GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisDelegateKey) # | |
| FromCBOR (Hash GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisExtendedKey) # | |
| FromCBOR (Hash GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash StakeKey) Source # | |
| FromCBOR (Hash PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash PaymentExtendedKey) # | |
| FromCBOR (Hash PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR (Hash ByronKey) Source # | |
| FromCBOR (Hash VrfKey) Source # | |
| FromCBOR (Hash KesKey) Source # | |
| Crypto c ⇒ FromCBOR (ShelleyHash c) | |
| Era era ⇒ FromCBOR (CompactGenesis era) | |
| FromCBOR (ATxAux ByteSpan) | |
| FromCBOR (ACertificate ByteSpan) | |
| FromCBOR (AProposal ByteSpan) | |
| FromCBOR (AVote ByteSpan) | |
| FromCBOR (CertVRF PraosVRF) | |
| FromCBOR (CertVRF MockVRF) | |
| FromCBOR (CertVRF SimpleVRF) | |
| Typeable a ⇒ FromCBOR (RedeemSignature a) | |
| Typeable a ⇒ FromCBOR (Signature a) | |
| FromCBOR (ABody ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (ABlockSignature ByteSpan) | |
| FromCBOR (ATxPayload ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (Attributes ()) | |
| FromCBOR (Attributes AddrAttributes) | |
| FromCBOR a ⇒ FromCBOR (MerkleRoot a) | |
| (FromCBOR a, ToCBOR a) ⇒ FromCBOR (MerkleTree a) | |
| FromCBOR n ⇒ FromCBOR (TooLarge n) | |
| Crypto crypto ⇒ FromCBOR (FreeVars crypto) | |
| Crypto c ⇒ FromCBOR (Pulser c) | |
| Crypto crypto ⇒ FromCBOR (PoolRewardInfo crypto) | |
| Crypto crypto ⇒ FromCBOR (LeaderOnlyReward crypto) | |
| FromCBOR a ⇒ FromCBOR (CborSeq a) | |
| FromCBOR (VerificationKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakePoolKey) # label ∷ Proxy (VerificationKey StakePoolKey) → Text # | |
| FromCBOR (VerificationKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisUTxOKey) # label ∷ Proxy (VerificationKey GenesisUTxOKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateExtendedKey) # label ∷ Proxy (VerificationKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateKey) # | |
| FromCBOR (VerificationKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisExtendedKey) # | |
| FromCBOR (VerificationKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisKey) # label ∷ Proxy (VerificationKey GenesisKey) → Text # | |
| FromCBOR (VerificationKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeExtendedKey) # | |
| FromCBOR (VerificationKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeKey) # | |
| FromCBOR (VerificationKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentExtendedKey) # | |
| FromCBOR (VerificationKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentKey) # label ∷ Proxy (VerificationKey PaymentKey) → Text # | |
| FromCBOR (VerificationKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKeyLegacy) # label ∷ Proxy (VerificationKey ByronKeyLegacy) → Text # | |
| FromCBOR (VerificationKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKey) # | |
| FromCBOR (VerificationKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey VrfKey) # | |
| FromCBOR (VerificationKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey KesKey) # | |
| FromCBOR (SigningKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakePoolKey) # label ∷ Proxy (SigningKey StakePoolKey) → Text # | |
| FromCBOR (SigningKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisUTxOKey) # label ∷ Proxy (SigningKey GenesisUTxOKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateExtendedKey) # label ∷ Proxy (SigningKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateKey) # label ∷ Proxy (SigningKey GenesisDelegateKey) → Text # | |
| FromCBOR (SigningKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisExtendedKey) # label ∷ Proxy (SigningKey GenesisExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakeExtendedKey) # label ∷ Proxy (SigningKey StakeExtendedKey) → Text # | |
| FromCBOR (SigningKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey PaymentExtendedKey) # label ∷ Proxy (SigningKey PaymentExtendedKey) → Text # | |
| FromCBOR (SigningKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (SigningKey ByronKeyLegacy) # label ∷ Proxy (SigningKey ByronKeyLegacy) → Text # | |
| FromCBOR (SigningKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR (SigningKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR (SigningKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| (SerialiseAsRawBytes a, Typeable a) ⇒ FromCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing | |
| (Typeable lang, HasTypeProxy lang) ⇒ FromCBOR (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
| (Typeable era, TransLedgerState FromCBOR (ShelleyLedgerEra era), Share (TxOut (ShelleyLedgerEra era)) ~ Interns (Credential 'Staking (Crypto (ShelleyLedgerEra era))), FromSharedCBOR (TxOut (ShelleyLedgerEra era))) ⇒ FromCBOR (DebugLedgerState era) Source # | |
Defined in Cardano.Api.Query | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (a, b) | |
| (Ord k, FromCBOR k, FromCBOR v) ⇒ FromCBOR (Map k v) | |
| (HashAlgorithm h, Typeable a) ⇒ FromCBOR (Hash h a) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Credential kr crypto) | |
| (Typeable index, Crypto c) ⇒ FromCBOR (SafeHash c index) | |
| (Crypto crypto, Typeable disc) ⇒ FromCBOR (KeyHash disc crypto) | |
| (FromCBOR a, Bounded (BoundedRatio b a), Bounded a, Integral a, Typeable b, Typeable a, Show a) ⇒ FromCBOR (BoundedRatio b a) | |
| (Crypto crypto, Typeable kd) ⇒ FromCBOR (VKey kd crypto) | |
| (VRFAlgorithm v, Typeable a) ⇒ FromCBOR (CertifiedVRF v a) | |
| (Typeable algo, Typeable a, HashAlgorithm algo) ⇒ FromCBOR (AbstractHash algo a) | |
| (FromCBOR a, FromCBOR b, FromCBOR c) ⇒ FromCBOR (a, b, c) | |
| (Typeable s, FromCBOR a) ⇒ FromCBOR (Tagged s a) | |
| (FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v, Typeable kv, Typeable vv) ⇒ FromCBOR (KVVector kv vv (k, v)) | |
| (Ord a, Ord b, FromCBOR a, FromCBOR b) ⇒ FromCBOR (BiMap b a b) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) ⇒ FromCBOR (a, b, c, d) | |
| (Typeable kv, Typeable vv, FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v) ⇒ FromCBOR (VMap kv vv k v) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) ⇒ FromCBOR (a, b, c, d, e) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) ⇒ FromCBOR (a, b, c, d, e, f, g) | |
serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString Source #
deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a Source #
JSON
Instances
| ToJSON Bool | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Bool → Encoding # toJSONList ∷ [Bool] → Value # toEncodingList ∷ [Bool] → Encoding # | |
| ToJSON Char | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Char → Encoding # toJSONList ∷ [Char] → Value # toEncodingList ∷ [Char] → Encoding # | |
| ToJSON Double | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Double → Encoding # toJSONList ∷ [Double] → Value # toEncodingList ∷ [Double] → Encoding # | |
| ToJSON Float | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Float → Encoding # toJSONList ∷ [Float] → Value # toEncodingList ∷ [Float] → Encoding # | |
| ToJSON Int | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Int8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int8 → Encoding # toJSONList ∷ [Int8] → Value # toEncodingList ∷ [Int8] → Encoding # | |
| ToJSON Int16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int16 → Encoding # toJSONList ∷ [Int16] → Value # toEncodingList ∷ [Int16] → Encoding # | |
| ToJSON Int32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int32 → Encoding # toJSONList ∷ [Int32] → Value # toEncodingList ∷ [Int32] → Encoding # | |
| ToJSON Int64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int64 → Encoding # toJSONList ∷ [Int64] → Value # toEncodingList ∷ [Int64] → Encoding # | |
| ToJSON Integer | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Integer → Encoding # toJSONList ∷ [Integer] → Value # toEncodingList ∷ [Integer] → Encoding # | |
| ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Natural → Encoding # toJSONList ∷ [Natural] → Value # toEncodingList ∷ [Natural] → Encoding # | |
| ToJSON Ordering | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ordering → Encoding # toJSONList ∷ [Ordering] → Value # toEncodingList ∷ [Ordering] → Encoding # | |
| ToJSON Word | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word → Encoding # toJSONList ∷ [Word] → Value # toEncodingList ∷ [Word] → Encoding # | |
| ToJSON Word8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word8 → Encoding # toJSONList ∷ [Word8] → Value # toEncodingList ∷ [Word8] → Encoding # | |
| ToJSON Word16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word16 → Encoding # toJSONList ∷ [Word16] → Value # toEncodingList ∷ [Word16] → Encoding # | |
| ToJSON Word32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word32 → Encoding # toJSONList ∷ [Word32] → Value # toEncodingList ∷ [Word32] → Encoding # | |
| ToJSON Word64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word64 → Encoding # toJSONList ∷ [Word64] → Value # toEncodingList ∷ [Word64] → Encoding # | |
| ToJSON () | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Version | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Version → Encoding # toJSONList ∷ [Version] → Value # toEncodingList ∷ [Version] → Encoding # | |
| ToJSON Void | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Void → Encoding # toJSONList ∷ [Void] → Value # toEncodingList ∷ [Void] → Encoding # | |
| ToJSON CTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ CTime → Encoding # toJSONList ∷ [CTime] → Value # toEncodingList ∷ [CTime] → Encoding # | |
| ToJSON IntSet | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntSet → Encoding # toJSONList ∷ [IntSet] → Value # toEncodingList ∷ [IntSet] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON ZonedTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ ZonedTime → Encoding # toJSONList ∷ [ZonedTime] → Value # toEncodingList ∷ [ZonedTime] → Encoding # | |
| ToJSON LocalTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ LocalTime → Encoding # toJSONList ∷ [LocalTime] → Value # toEncodingList ∷ [LocalTime] → Encoding # | |
| ToJSON TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ TimeOfDay → Encoding # toJSONList ∷ [TimeOfDay] → Value # toEncodingList ∷ [TimeOfDay] → Encoding # | |
| ToJSON CalendarDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffTime → Value # toEncoding ∷ CalendarDiffTime → Encoding # toJSONList ∷ [CalendarDiffTime] → Value # toEncodingList ∷ [CalendarDiffTime] → Encoding # | |
| ToJSON UTCTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UTCTime → Encoding # toJSONList ∷ [UTCTime] → Value # toEncodingList ∷ [UTCTime] → Encoding # | |
| ToJSON SystemTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SystemTime → Value # toEncoding ∷ SystemTime → Encoding # toJSONList ∷ [SystemTime] → Value # toEncodingList ∷ [SystemTime] → Encoding # | |
| ToJSON NominalDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ NominalDiffTime → Value # toEncoding ∷ NominalDiffTime → Encoding # toJSONList ∷ [NominalDiffTime] → Value # toEncodingList ∷ [NominalDiffTime] → Encoding # | |
| ToJSON DiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DiffTime → Encoding # toJSONList ∷ [DiffTime] → Value # toEncodingList ∷ [DiffTime] → Encoding # | |
| ToJSON DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DayOfWeek → Encoding # toJSONList ∷ [DayOfWeek] → Value # toEncodingList ∷ [DayOfWeek] → Encoding # | |
| ToJSON Day | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON CalendarDiffDays | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffDays → Value # toEncoding ∷ CalendarDiffDays → Encoding # toJSONList ∷ [CalendarDiffDays] → Value # toEncodingList ∷ [CalendarDiffDays] → Encoding # | |
| ToJSON Number | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Number → Encoding # toJSONList ∷ [Number] → Value # toEncodingList ∷ [Number] → Encoding # | |
| ToJSON Scientific | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Scientific → Encoding # toJSONList ∷ [Scientific] → Value # toEncodingList ∷ [Scientific] → Encoding # | |
| ToJSON Key | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON DotNetTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DotNetTime → Encoding # toJSONList ∷ [DotNetTime] → Value # toEncodingList ∷ [DotNetTime] → Encoding # | |
| ToJSON Value | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON ByteSpan | |
Defined in Cardano.Binary.Annotated Methods toEncoding ∷ ByteSpan → Encoding # toJSONList ∷ [ByteSpan] → Value # toEncodingList ∷ [ByteSpan] → Encoding # | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| ToJSON EpochSize | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochSize → Encoding # toJSONList ∷ [EpochSize] → Value # toEncodingList ∷ [EpochSize] → Encoding # | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| ToJSON ShortText | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ ShortText → Encoding # toJSONList ∷ [ShortText] → Value # toEncodingList ∷ [ShortText] → Encoding # | |
| ToJSON UUID | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UUID → Encoding # toJSONList ∷ [UUID] → Value # toEncodingList ∷ [UUID] → Encoding # | |
| ToJSON NonNegativeInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ NonNegativeInterval → Value # toEncoding ∷ NonNegativeInterval → Encoding # toJSONList ∷ [NonNegativeInterval] → Value # toEncodingList ∷ [NonNegativeInterval] → Encoding # | |
| ToJSON UnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ UnitInterval → Value # toEncoding ∷ UnitInterval → Encoding # toJSONList ∷ [UnitInterval] → Value # toEncodingList ∷ [UnitInterval] → Encoding # | |
| ToJSON ProtVer | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ ProtVer → Encoding # toJSONList ∷ [ProtVer] → Value # toEncodingList ∷ [ProtVer] → Encoding # | |
| ToJSON AlonzoGenesis | |
Defined in Cardano.Ledger.Alonzo.Genesis Methods toJSON ∷ AlonzoGenesis → Value # toEncoding ∷ AlonzoGenesis → Encoding # toJSONList ∷ [AlonzoGenesis] → Value # toEncodingList ∷ [AlonzoGenesis] → Encoding # | |
| ToJSON Coin | |
Defined in Cardano.Ledger.Coin Methods toEncoding ∷ Coin → Encoding # toJSONList ∷ [Coin] → Value # toEncodingList ∷ [Coin] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON SystemStart Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SystemStart → Value # toEncoding ∷ SystemStart → Encoding # toJSONList ∷ [SystemStart] → Value # toEncodingList ∷ [SystemStart] → Encoding # | |
| ToJSON Likelihood Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Likelihood → Encoding # toJSONList ∷ [Likelihood] → Value # toEncodingList ∷ [Likelihood] → Encoding # | |
| ToJSON Ptr Source # | |
Defined in Cardano.Api.Orphans | |
| ToJSON ExCPU | |
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding ∷ ExCPU → Encoding # toJSONList ∷ [ExCPU] → Value # toEncodingList ∷ [ExCPU] → Encoding # | |
| ToJSON ExMemory | |
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding ∷ ExMemory → Encoding # toJSONList ∷ [ExMemory] → Value # toEncodingList ∷ [ExMemory] → Encoding # | |
| ToJSON ExBudget | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods toEncoding ∷ ExBudget → Encoding # toJSONList ∷ [ExBudget] → Value # toEncodingList ∷ [ExBudget] → Encoding # | |
| ToJSON Desirability | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods toJSON ∷ Desirability → Value # toEncoding ∷ Desirability → Encoding # toJSONList ∷ [Desirability] → Value # toEncodingList ∷ [Desirability] → Encoding # | |
| ToJSON StakePoolRelay | |
Defined in Cardano.Ledger.Shelley.TxBody Methods toJSON ∷ StakePoolRelay → Value # toEncoding ∷ StakePoolRelay → Encoding # toJSONList ∷ [StakePoolRelay] → Value # toEncodingList ∷ [StakePoolRelay] → Encoding # | |
| ToJSON PoolMetadata | |
Defined in Cardano.Ledger.Shelley.TxBody Methods toJSON ∷ PoolMetadata → Value # toEncoding ∷ PoolMetadata → Encoding # toJSONList ∷ [PoolMetadata] → Value # toEncodingList ∷ [PoolMetadata] → Encoding # | |
| ToJSON Network | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Network → Encoding # toJSONList ∷ [Network] → Value # toEncodingList ∷ [Network] → Encoding # | |
| ToJSON Nonce | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Nonce → Encoding # toJSONList ∷ [Nonce] → Value # toEncodingList ∷ [Nonce] → Encoding # | |
| ToJSON AccountState Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ AccountState → Value # toEncoding ∷ AccountState → Encoding # toJSONList ∷ [AccountState] → Value # toEncodingList ∷ [AccountState] → Encoding # | |
| ToJSON TxIx Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
| ToJSON Url | |
Defined in Cardano.Ledger.BaseTypes | |
| ToJSON DeltaCoin Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ DeltaCoin → Encoding # toJSONList ∷ [DeltaCoin] → Value # toEncodingList ∷ [DeltaCoin] → Encoding # | |
| ToJSON Port | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Port → Encoding # toJSONList ∷ [Port] → Value # toEncodingList ∷ [Port] → Encoding # | |
| ToJSON DnsName | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ DnsName → Encoding # toJSONList ∷ [DnsName] → Value # toEncodingList ∷ [DnsName] → Encoding # | |
| ToJSON CertIx Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ CertIx → Encoding # toJSONList ∷ [CertIx] → Value # toEncodingList ∷ [CertIx] → Encoding # | |
| ToJSON PositiveInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ PositiveInterval → Value # toEncoding ∷ PositiveInterval → Encoding # toJSONList ∷ [PositiveInterval] → Value # toEncodingList ∷ [PositiveInterval] → Encoding # | |
| ToJSON PositiveUnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ PositiveUnitInterval → Value # toEncoding ∷ PositiveUnitInterval → Encoding # toJSONList ∷ [PositiveUnitInterval] → Value # toEncodingList ∷ [PositiveUnitInterval] → Encoding # | |
| ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ AnyCardanoEra → Value # toEncoding ∷ AnyCardanoEra → Encoding # toJSONList ∷ [AnyCardanoEra] → Value # toEncodingList ∷ [AnyCardanoEra] → Encoding # | |
| ToJSON Month | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Month → Encoding # toJSONList ∷ [Month] → Value # toEncodingList ∷ [Month] → Encoding # | |
| ToJSON Quarter | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Quarter → Encoding # toJSONList ∷ [Quarter] → Value # toEncodingList ∷ [Quarter] → Encoding # | |
| ToJSON QuarterOfYear | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ QuarterOfYear → Value # toEncoding ∷ QuarterOfYear → Encoding # toJSONList ∷ [QuarterOfYear] → Value # toEncodingList ∷ [QuarterOfYear] → Encoding # | |
| ToJSON EpochNumber | |
Defined in Cardano.Chain.Slotting.EpochNumber Methods toJSON ∷ EpochNumber → Value # toEncoding ∷ EpochNumber → Encoding # toJSONList ∷ [EpochNumber] → Value # toEncodingList ∷ [EpochNumber] → Encoding # | |
| ToJSON SlotNumber | |
Defined in Cardano.Chain.Slotting.SlotNumber Methods toEncoding ∷ SlotNumber → Encoding # toJSONList ∷ [SlotNumber] → Value # toEncodingList ∷ [SlotNumber] → Encoding # | |
| ToJSON RequiresNetworkMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ RequiresNetworkMagic → Value # toEncoding ∷ RequiresNetworkMagic → Encoding # toJSONList ∷ [RequiresNetworkMagic] → Value # toEncodingList ∷ [RequiresNetworkMagic] → Encoding # | |
| ToJSON ProtocolVersion | |
Defined in Cardano.Chain.Update.ProtocolVersion Methods toJSON ∷ ProtocolVersion → Value # toEncoding ∷ ProtocolVersion → Encoding # toJSONList ∷ [ProtocolVersion] → Value # toEncodingList ∷ [ProtocolVersion] → Encoding # | |
| ToJSON ProtocolMagicId | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagicId → Value # toEncoding ∷ ProtocolMagicId → Encoding # toJSONList ∷ [ProtocolMagicId] → Value # toEncodingList ∷ [ProtocolMagicId] → Encoding # | |
| ToJSON SoftwareVersion | |
Defined in Cardano.Chain.Update.SoftwareVersion Methods toJSON ∷ SoftwareVersion → Value # toEncoding ∷ SoftwareVersion → Encoding # toJSONList ∷ [SoftwareVersion] → Value # toEncodingList ∷ [SoftwareVersion] → Encoding # | |
| ToJSON CompactRedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.Compact Methods toJSON ∷ CompactRedeemVerificationKey → Value # toEncoding ∷ CompactRedeemVerificationKey → Encoding # toJSONList ∷ [CompactRedeemVerificationKey] → Value # toEncodingList ∷ [CompactRedeemVerificationKey] → Encoding # | |
| ToJSON Lovelace | |
Defined in Cardano.Chain.Common.Lovelace Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON VerificationKey | |
Defined in Cardano.Crypto.Signing.VerificationKey Methods toJSON ∷ VerificationKey → Value # toEncoding ∷ VerificationKey → Encoding # toJSONList ∷ [VerificationKey] → Value # toEncodingList ∷ [VerificationKey] → Encoding # | |
| ToJSON GenesisHash | |
Defined in Cardano.Chain.Genesis.Hash Methods toJSON ∷ GenesisHash → Value # toEncoding ∷ GenesisHash → Encoding # toJSONList ∷ [GenesisHash] → Value # toEncodingList ∷ [GenesisHash] → Encoding # | |
| ToJSON Tx | |
Defined in Cardano.Chain.UTxO.Tx | |
| ToJSON ProtocolMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagic → Value # toEncoding ∷ ProtocolMagic → Encoding # toJSONList ∷ [ProtocolMagic] → Value # toEncodingList ∷ [ProtocolMagic] → Encoding # | |
| ToJSON RewardParams | |
Defined in Cardano.Ledger.Shelley.API.Wallet Methods toJSON ∷ RewardParams → Value # toEncoding ∷ RewardParams → Encoding # toJSONList ∷ [RewardParams] → Value # toEncodingList ∷ [RewardParams] → Encoding # | |
| ToJSON RewardInfoPool | |
Defined in Cardano.Ledger.Shelley.API.Wallet Methods toJSON ∷ RewardInfoPool → Value # toEncoding ∷ RewardInfoPool → Encoding # toJSONList ∷ [RewardInfoPool] → Value # toEncodingList ∷ [RewardInfoPool] → Encoding # | |
| ToJSON ByteString64 | |
Defined in Data.ByteString.Base64.Type Methods toJSON ∷ ByteString64 → Value # toEncoding ∷ ByteString64 → Encoding # toJSONList ∷ [ByteString64] → Value # toEncodingList ∷ [ByteString64] → Encoding # | |
| ToJSON RedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.VerificationKey Methods toJSON ∷ RedeemVerificationKey → Value # toEncoding ∷ RedeemVerificationKey → Encoding # toJSONList ∷ [RedeemVerificationKey] → Value # toEncodingList ∷ [RedeemVerificationKey] → Encoding # | |
| ToJSON ChainDifficulty | |
Defined in Cardano.Chain.Common.ChainDifficulty Methods toJSON ∷ ChainDifficulty → Value # toEncoding ∷ ChainDifficulty → Encoding # toJSONList ∷ [ChainDifficulty] → Value # toEncodingList ∷ [ChainDifficulty] → Encoding # | |
| ToJSON Proof | |
Defined in Cardano.Chain.Block.Proof Methods toEncoding ∷ Proof → Encoding # toJSONList ∷ [Proof] → Value # toEncodingList ∷ [Proof] → Encoding # | |
| ToJSON SscPayload | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscPayload → Encoding # toJSONList ∷ [SscPayload] → Value # toEncodingList ∷ [SscPayload] → Encoding # | |
| ToJSON ProposalBody | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ ProposalBody → Value # toEncoding ∷ ProposalBody → Encoding # toJSONList ∷ [ProposalBody] → Value # toEncodingList ∷ [ProposalBody] → Encoding # | |
| ToJSON TxInWitness | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toJSON ∷ TxInWitness → Value # toEncoding ∷ TxInWitness → Encoding # toJSONList ∷ [TxInWitness] → Value # toEncodingList ∷ [TxInWitness] → Encoding # | |
| ToJSON TxProof | |
Defined in Cardano.Chain.UTxO.TxProof Methods toEncoding ∷ TxProof → Encoding # toJSONList ∷ [TxProof] → Value # toEncodingList ∷ [TxProof] → Encoding # | |
| ToJSON SscProof | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscProof → Encoding # toJSONList ∷ [SscProof] → Value # toEncodingList ∷ [SscProof] → Encoding # | |
| ToJSON ApplicationName | |
Defined in Cardano.Chain.Update.ApplicationName Methods toJSON ∷ ApplicationName → Value # toEncoding ∷ ApplicationName → Encoding # toJSONList ∷ [ApplicationName] → Value # toEncodingList ∷ [ApplicationName] → Encoding # | |
| ToJSON AddrAttributes | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ AddrAttributes → Value # toEncoding ∷ AddrAttributes → Encoding # toJSONList ∷ [AddrAttributes] → Value # toEncodingList ∷ [AddrAttributes] → Encoding # | |
| ToJSON HDAddressPayload | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ HDAddressPayload → Value # toEncoding ∷ HDAddressPayload → Encoding # toJSONList ∷ [HDAddressPayload] → Value # toEncodingList ∷ [HDAddressPayload] → Encoding # | |
| ToJSON NetworkMagic | |
Defined in Cardano.Chain.Common.NetworkMagic Methods toJSON ∷ NetworkMagic → Value # toEncoding ∷ NetworkMagic → Encoding # toJSONList ∷ [NetworkMagic] → Value # toEncodingList ∷ [NetworkMagic] → Encoding # | |
| ToJSON UnparsedFields | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ UnparsedFields → Value # toEncoding ∷ UnparsedFields → Encoding # toJSONList ∷ [UnparsedFields] → Value # toEncodingList ∷ [UnparsedFields] → Encoding # | |
| ToJSON AddrType | |
Defined in Cardano.Chain.Common.AddrSpendingData Methods toEncoding ∷ AddrType → Encoding # toJSONList ∷ [AddrType] → Value # toEncodingList ∷ [AddrType] → Encoding # | |
| ToJSON Address | |
Defined in Cardano.Chain.Common.Address Methods toEncoding ∷ Address → Encoding # toJSONList ∷ [Address] → Value # toEncodingList ∷ [Address] → Encoding # | |
| ToJSON LovelacePortion | |
Defined in Cardano.Chain.Common.LovelacePortion Methods toJSON ∷ LovelacePortion → Value # toEncoding ∷ LovelacePortion → Encoding # toJSONList ∷ [LovelacePortion] → Value # toEncodingList ∷ [LovelacePortion] → Encoding # | |
| ToJSON TxFeePolicy | |
Defined in Cardano.Chain.Common.TxFeePolicy Methods toJSON ∷ TxFeePolicy → Value # toEncoding ∷ TxFeePolicy → Encoding # toJSONList ∷ [TxFeePolicy] → Value # toEncodingList ∷ [TxFeePolicy] → Encoding # | |
| ToJSON TxSizeLinear | |
Defined in Cardano.Chain.Common.TxSizeLinear Methods toJSON ∷ TxSizeLinear → Value # toEncoding ∷ TxSizeLinear → Encoding # toJSONList ∷ [TxSizeLinear] → Value # toEncodingList ∷ [TxSizeLinear] → Encoding # | |
| ToJSON TxIn | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxOut | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxOut → Encoding # toJSONList ∷ [TxOut] → Value # toEncodingList ∷ [TxOut] → Encoding # | |
| ToJSON TxSigData | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toEncoding ∷ TxSigData → Encoding # toJSONList ∷ [TxSigData] → Value # toEncodingList ∷ [TxSigData] → Encoding # | |
| ToJSON InstallerHash | |
Defined in Cardano.Chain.Update.InstallerHash Methods toJSON ∷ InstallerHash → Value # toEncoding ∷ InstallerHash → Encoding # toJSONList ∷ [InstallerHash] → Value # toEncodingList ∷ [InstallerHash] → Encoding # | |
| ToJSON SystemTag | |
Defined in Cardano.Chain.Update.SystemTag Methods toEncoding ∷ SystemTag → Encoding # toJSONList ∷ [SystemTag] → Value # toEncodingList ∷ [SystemTag] → Encoding # | |
| ToJSON ProtocolParametersUpdate | |
Defined in Cardano.Chain.Update.ProtocolParametersUpdate Methods toJSON ∷ ProtocolParametersUpdate → Value # toEncoding ∷ ProtocolParametersUpdate → Encoding # toJSONList ∷ [ProtocolParametersUpdate] → Value # toEncodingList ∷ [ProtocolParametersUpdate] → Encoding # | |
| ToJSON SoftforkRule | |
Defined in Cardano.Chain.Update.SoftforkRule Methods toJSON ∷ SoftforkRule → Value # toEncoding ∷ SoftforkRule → Encoding # toJSONList ∷ [SoftforkRule] → Value # toEncodingList ∷ [SoftforkRule] → Encoding # | |
| ToJSON RewardType Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ RewardType → Encoding # toJSONList ∷ [RewardType] → Value # toEncodingList ∷ [RewardType] → Encoding # | |
| ToJSON SatInt | |
Defined in Data.SatInt Methods toEncoding ∷ SatInt → Encoding # toJSONList ∷ [SatInt] → Value # toEncodingList ∷ [SatInt] → Encoding # | |
| ToJSON ModelAddedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelAddedSizes → Value # toEncoding ∷ ModelAddedSizes → Encoding # toJSONList ∷ [ModelAddedSizes] → Value # toEncodingList ∷ [ModelAddedSizes] → Encoding # | |
| ToJSON ModelConstantOrLinear | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelConstantOrLinear → Value # toEncoding ∷ ModelConstantOrLinear → Encoding # toJSONList ∷ [ModelConstantOrLinear] → Value # toEncodingList ∷ [ModelConstantOrLinear] → Encoding # | |
| ToJSON ModelConstantOrTwoArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelConstantOrTwoArguments → Value # toEncoding ∷ ModelConstantOrTwoArguments → Encoding # toJSONList ∷ [ModelConstantOrTwoArguments] → Value # toEncodingList ∷ [ModelConstantOrTwoArguments] → Encoding # | |
| ToJSON ModelFiveArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelFiveArguments → Value # toEncoding ∷ ModelFiveArguments → Encoding # toJSONList ∷ [ModelFiveArguments] → Value # toEncodingList ∷ [ModelFiveArguments] → Encoding # | |
| ToJSON ModelFourArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelFourArguments → Value # toEncoding ∷ ModelFourArguments → Encoding # toJSONList ∷ [ModelFourArguments] → Value # toEncodingList ∷ [ModelFourArguments] → Encoding # | |
| ToJSON ModelLinearSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelLinearSize → Value # toEncoding ∷ ModelLinearSize → Encoding # toJSONList ∷ [ModelLinearSize] → Value # toEncodingList ∷ [ModelLinearSize] → Encoding # | |
| ToJSON ModelMaxSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMaxSize → Value # toEncoding ∷ ModelMaxSize → Encoding # toJSONList ∷ [ModelMaxSize] → Value # toEncodingList ∷ [ModelMaxSize] → Encoding # | |
| ToJSON ModelMinSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMinSize → Value # toEncoding ∷ ModelMinSize → Encoding # toJSONList ∷ [ModelMinSize] → Value # toEncodingList ∷ [ModelMinSize] → Encoding # | |
| ToJSON ModelMultipliedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMultipliedSizes → Value # toEncoding ∷ ModelMultipliedSizes → Encoding # toJSONList ∷ [ModelMultipliedSizes] → Value # toEncodingList ∷ [ModelMultipliedSizes] → Encoding # | |
| ToJSON ModelOneArgument | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelOneArgument → Value # toEncoding ∷ ModelOneArgument → Encoding # toJSONList ∷ [ModelOneArgument] → Value # toEncodingList ∷ [ModelOneArgument] → Encoding # | |
| ToJSON ModelSixArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelSixArguments → Value # toEncoding ∷ ModelSixArguments → Encoding # toJSONList ∷ [ModelSixArguments] → Value # toEncodingList ∷ [ModelSixArguments] → Encoding # | |
| ToJSON ModelSubtractedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelSubtractedSizes → Value # toEncoding ∷ ModelSubtractedSizes → Encoding # toJSONList ∷ [ModelSubtractedSizes] → Value # toEncodingList ∷ [ModelSubtractedSizes] → Encoding # | |
| ToJSON ModelThreeArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelThreeArguments → Value # toEncoding ∷ ModelThreeArguments → Encoding # toJSONList ∷ [ModelThreeArguments] → Value # toEncodingList ∷ [ModelThreeArguments] → Encoding # | |
| ToJSON ModelTwoArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelTwoArguments → Value # toEncoding ∷ ModelTwoArguments → Encoding # toJSONList ∷ [ModelTwoArguments] → Value # toEncodingList ∷ [ModelTwoArguments] → Encoding # | |
| ToJSON CekMachineCosts | |
Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts Methods toJSON ∷ CekMachineCosts → Value # toEncoding ∷ CekMachineCosts → Encoding # toJSONList ∷ [CekMachineCosts] → Value # toEncodingList ∷ [CekMachineCosts] → Encoding # | |
| ToJSON PeerAdvertise | |
Defined in Ouroboros.Network.PeerSelection.Types Methods toJSON ∷ PeerAdvertise → Value # toEncoding ∷ PeerAdvertise → Encoding # toJSONList ∷ [PeerAdvertise] → Value # toEncodingList ∷ [PeerAdvertise] → Encoding # | |
| ToJSON StudentT | |
Defined in Statistics.Distribution.StudentT Methods toEncoding ∷ StudentT → Encoding # toJSONList ∷ [StudentT] → Value # toEncodingList ∷ [StudentT] → Encoding # | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| ToJSON TextEnvelopeDescr Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeDescr → Value # toEncoding ∷ TextEnvelopeDescr → Encoding # toJSONList ∷ [TextEnvelopeDescr] → Value # toEncodingList ∷ [TextEnvelopeDescr] → Encoding # | |
| ToJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeType → Value # toEncoding ∷ TextEnvelopeType → Encoding # toJSONList ∷ [TextEnvelopeType] → Value # toEncodingList ∷ [TextEnvelopeType] → Encoding # | |
| ToJSON TxSubmitStatus Source # | |
Defined in Cardano.Api.TxSubmit.Types Methods toJSON ∷ TxSubmitStatus → Value # toEncoding ∷ TxSubmitStatus → Encoding # toJSONList ∷ [TxSubmitStatus] → Value # toEncodingList ∷ [TxSubmitStatus] → Encoding # | |
| ToJSON ScriptHash Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptHash → Value # toEncoding ∷ ScriptHash → Encoding # toJSONList ∷ [ScriptHash] → Value # toEncodingList ∷ [ScriptHash] → Encoding # | |
| ToJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ExecutionUnits → Value # toEncoding ∷ ExecutionUnits → Encoding # toJSONList ∷ [ExecutionUnits] → Value # toEncodingList ∷ [ExecutionUnits] → Encoding # | |
| ToJSON ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInAnyLang → Value # toEncoding ∷ ScriptInAnyLang → Encoding # toJSONList ∷ [ScriptInAnyLang] → Value # toEncodingList ∷ [ScriptInAnyLang] → Encoding # | |
| ToJSON AnyPlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ AnyPlutusScriptVersion → Value # toEncoding ∷ AnyPlutusScriptVersion → Encoding # toJSONList ∷ [AnyPlutusScriptVersion] → Value # toEncodingList ∷ [AnyPlutusScriptVersion] → Encoding # | |
| ToJSON StakeAddress Source # | |
Defined in Cardano.Api.Address Methods toJSON ∷ StakeAddress → Value # toEncoding ∷ StakeAddress → Encoding # toJSONList ∷ [StakeAddress] → Value # toEncodingList ∷ [StakeAddress] → Encoding # | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
| ToJSON Value Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value0 # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON PolicyId Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ PolicyId → Encoding # toJSONList ∷ [PolicyId] → Value # toEncodingList ∷ [PolicyId] → Encoding # | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toEncoding ∷ CostModel → Encoding # toJSONList ∷ [CostModel] → Value # toEncodingList ∷ [CostModel] → Encoding # | |
| ToJSON ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ExecutionUnitPrices → Value # toEncoding ∷ ExecutionUnitPrices → Encoding # toJSONList ∷ [ExecutionUnitPrices] → Value # toEncodingList ∷ [ExecutionUnitPrices] → Encoding # | |
| ToJSON PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ PraosNonce → Value # toEncoding ∷ PraosNonce → Encoding # toJSONList ∷ [PraosNonce] → Value # toEncodingList ∷ [PraosNonce] → Encoding # | |
| ToJSON ProtocolParameters Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ProtocolParameters → Value # toEncoding ∷ ProtocolParameters → Encoding # toJSONList ∷ [ProtocolParameters] → Value # toEncodingList ∷ [ProtocolParameters] → Encoding # | |
| ToJSON TxIx Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
| ToJSON TxIn Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| ToJSON TextEnvelopeCddl Source # | |
Defined in Cardano.Api.SerialiseLedgerCddl Methods toJSON ∷ TextEnvelopeCddl → Value # toEncoding ∷ TextEnvelopeCddl → Encoding # toJSONList ∷ [TextEnvelopeCddl] → Value # toEncodingList ∷ [TextEnvelopeCddl] → Encoding # | |
| ToJSON ChainTip Source # | |
Defined in Cardano.Api.Block Methods toEncoding ∷ ChainTip → Encoding # toJSONList ∷ [ChainTip] → Value # toEncodingList ∷ [ChainTip] → Encoding # | |
| ToJSON a ⇒ ToJSON [a] | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| (ToJSON a, Integral a) ⇒ ToJSON (Ratio a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ratio a → Encoding # toJSONList ∷ [Ratio a] → Value # toEncodingList ∷ [Ratio a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Set a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Set a → Encoding # toJSONList ∷ [Set a] → Value # toEncodingList ∷ [Set a] → Encoding # | |
| ToJSON a ⇒ ToJSON (NonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ NonEmpty a → Encoding # toJSONList ∷ [NonEmpty a] → Value # toEncodingList ∷ [NonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Identity a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Identity a → Encoding # toJSONList ∷ [Identity a] → Value # toEncodingList ∷ [Identity a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Min a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Min a → Encoding # toJSONList ∷ [Min a] → Value # toEncodingList ∷ [Min a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Max a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Max a → Encoding # toJSONList ∷ [Max a] → Value # toEncodingList ∷ [Max a] → Encoding # | |
| ToJSON a ⇒ ToJSON (WrappedMonoid a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ WrappedMonoid a → Value # toEncoding ∷ WrappedMonoid a → Encoding # toJSONList ∷ [WrappedMonoid a] → Value # toEncodingList ∷ [WrappedMonoid a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Option a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Option a → Encoding # toJSONList ∷ [Option a] → Value # toEncodingList ∷ [Option a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Dual a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Dual a → Encoding # toJSONList ∷ [Dual a] → Value # toEncodingList ∷ [Dual a] → Encoding # | |
| ToJSON a ⇒ ToJSON (IntMap a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntMap a → Encoding # toJSONList ∷ [IntMap a] → Value # toEncodingList ∷ [IntMap a] → Encoding # | |
| ToJSON v ⇒ ToJSON (Tree v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tree v → Encoding # toJSONList ∷ [Tree v] → Value # toEncodingList ∷ [Tree v] → Encoding # | |
| ToJSON a ⇒ ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Seq a → Encoding # toJSONList ∷ [Seq a] → Value # toEncodingList ∷ [Seq a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Solo a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Solo a → Encoding # toJSONList ∷ [Solo a] → Value # toEncodingList ∷ [Solo a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (Vector Vector a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON v ⇒ ToJSON (KeyMap v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ KeyMap v → Encoding # toJSONList ∷ [KeyMap v] → Value # toEncodingList ∷ [KeyMap v] → Encoding # | |
| ToJSON1 f ⇒ ToJSON (Fix f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fix f → Encoding # toJSONList ∷ [Fix f] → Value # toEncodingList ∷ [Fix f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Mu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Mu f → Encoding # toJSONList ∷ [Mu f] → Value # toEncodingList ∷ [Mu f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Nu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Nu f → Encoding # toJSONList ∷ [Nu f] → Value # toEncodingList ∷ [Nu f] → Encoding # | |
| ToJSON a ⇒ ToJSON (DNonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ DNonEmpty a → Value # toEncoding ∷ DNonEmpty a → Encoding # toJSONList ∷ [DNonEmpty a] → Value # toEncodingList ∷ [DNonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (DList a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DList a → Encoding # toJSONList ∷ [DList a] → Value # toEncodingList ∷ [DList a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Array a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Array a → Encoding # toJSONList ∷ [Array a] → Value # toEncodingList ∷ [Array a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (PrimArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ PrimArray a → Value # toEncoding ∷ PrimArray a → Encoding # toJSONList ∷ [PrimArray a] → Value # toEncodingList ∷ [PrimArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (SmallArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SmallArray a → Value # toEncoding ∷ SmallArray a → Encoding # toJSONList ∷ [SmallArray a] → Value # toEncodingList ∷ [SmallArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| ToJSON a ⇒ ToJSON (HashSet a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ HashSet a → Encoding # toJSONList ∷ [HashSet a] → Value # toEncodingList ∷ [HashSet a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (Storable a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (PPUPState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PPUPState era → Value # toEncoding ∷ PPUPState era → Encoding # toJSONList ∷ [PPUPState era] → Value # toEncodingList ∷ [PPUPState era] → Encoding # | |
| ToJSON a ⇒ ToJSON (StrictMaybe a) | |
Defined in Data.Maybe.Strict Methods toJSON ∷ StrictMaybe a → Value # toEncoding ∷ StrictMaybe a → Encoding # toJSONList ∷ [StrictMaybe a] → Value # toEncodingList ∷ [StrictMaybe a] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (UTxOState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ UTxOState era → Value # toEncoding ∷ UTxOState era → Encoding # toJSONList ∷ [UTxOState era] → Value # toEncodingList ∷ [UTxOState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DPState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DPState crypto → Value # toEncoding ∷ DPState crypto → Encoding # toJSONList ∷ [DPState crypto] → Value # toEncodingList ∷ [DPState crypto] → Encoding # | |
| ToJSON (Value era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Value era → Encoding # toJSONList ∷ [Value era] → Value0 # toEncodingList ∷ [Value era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (Value era)) ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| ToJSON (PParamsUpdate era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PParamsUpdate era → Value # toEncoding ∷ PParamsUpdate era → Encoding # toJSONList ∷ [PParamsUpdate era] → Value # toEncodingList ∷ [PParamsUpdate era] → Encoding # | |
| ToJSON (PParams era) | |
Defined in Cardano.Ledger.Shelley.PParams Methods toJSON ∷ PParams era → Value # toEncoding ∷ PParams era → Encoding # toJSONList ∷ [PParams era] → Value # toEncodingList ∷ [PParams era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (ScriptHash crypto) | |
Defined in Cardano.Ledger.Hashes Methods toJSON ∷ ScriptHash crypto → Value # toEncoding ∷ ScriptHash crypto → Encoding # toJSONList ∷ [ScriptHash crypto] → Value # toEncodingList ∷ [ScriptHash crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (StrictSeq a) | |
Defined in Data.Sequence.Strict Methods toJSON ∷ StrictSeq a → Value # toEncoding ∷ StrictSeq a → Encoding # toJSONList ∷ [StrictSeq a] → Value # toEncodingList ∷ [StrictSeq a] → Encoding # | |
| ToJSON (PolicyID era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PolicyID era → Value # toEncoding ∷ PolicyID era → Encoding # toJSONList ∷ [PolicyID era] → Value # toEncodingList ∷ [PolicyID era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (TxIn crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ TxIn crypto → Value # toEncoding ∷ TxIn crypto → Encoding # toJSONList ∷ [TxIn crypto] → Value # toEncodingList ∷ [TxIn crypto] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era)) ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| Era era ⇒ ToJSON (ShelleyGenesis era) | |
Defined in Cardano.Ledger.Shelley.Genesis Methods toJSON ∷ ShelleyGenesis era → Value # toEncoding ∷ ShelleyGenesis era → Encoding # toJSONList ∷ [ShelleyGenesis era] → Value # toEncodingList ∷ [ShelleyGenesis era] → Encoding # | |
| ToJSON (Addr crypto) | |
Defined in Cardano.Ledger.Address Methods toJSON ∷ Addr crypto → Value # toEncoding ∷ Addr crypto → Encoding # toJSONList ∷ [Addr crypto] → Value # toEncodingList ∷ [Addr crypto] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParams era), ToJSON (PParamsDelta era)) ⇒ ToJSON (EpochState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ EpochState era → Value # toEncoding ∷ EpochState era → Encoding # toJSONList ∷ [EpochState era] → Value # toEncodingList ∷ [EpochState era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (LedgerState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ LedgerState era → Value # toEncoding ∷ LedgerState era → Encoding # toJSONList ∷ [LedgerState era] → Value # toEncodingList ∷ [LedgerState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (BlocksMade crypto) | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ BlocksMade crypto → Value # toEncoding ∷ BlocksMade crypto → Encoding # toJSONList ∷ [BlocksMade crypto] → Value # toEncodingList ∷ [BlocksMade crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShots crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShots crypto → Value # toEncoding ∷ SnapShots crypto → Encoding # toJSONList ∷ [SnapShots crypto] → Value # toEncodingList ∷ [SnapShots crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (NonMyopic crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ NonMyopic crypto → Value # toEncoding ∷ NonMyopic crypto → Encoding # toJSONList ∷ [NonMyopic crypto] → Value # toEncodingList ∷ [NonMyopic crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PulsingRewUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PulsingRewUpdate crypto → Value # toEncoding ∷ PulsingRewUpdate crypto → Encoding # toJSONList ∷ [PulsingRewUpdate crypto] → Value # toEncodingList ∷ [PulsingRewUpdate crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolDistr crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PoolDistr crypto → Value # toEncoding ∷ PoolDistr crypto → Encoding # toJSONList ∷ [PoolDistr crypto] → Value # toEncodingList ∷ [PoolDistr crypto] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (ProposedPPUpdates era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ ProposedPPUpdates era → Value # toEncoding ∷ ProposedPPUpdates era → Encoding # toJSONList ∷ [ProposedPPUpdates era] → Value # toEncodingList ∷ [ProposedPPUpdates era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegPair crypto) | |
Defined in Cardano.Ledger.Keys Methods toJSON ∷ GenDelegPair crypto → Value # toEncoding ∷ GenDelegPair crypto → Encoding # toJSONList ∷ [GenDelegPair crypto] → Value # toEncodingList ∷ [GenDelegPair crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (ShelleyGenesisStaking crypto) | |
Defined in Cardano.Ledger.Shelley.Genesis Methods toJSON ∷ ShelleyGenesisStaking crypto → Value # toEncoding ∷ ShelleyGenesisStaking crypto → Encoding # toJSONList ∷ [ShelleyGenesisStaking crypto] → Value # toEncodingList ∷ [ShelleyGenesisStaking crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (IncrementalStake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ IncrementalStake crypto → Value # toEncoding ∷ IncrementalStake crypto → Encoding # toJSONList ∷ [IncrementalStake crypto] → Value # toEncodingList ∷ [IncrementalStake crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PState crypto → Value # toEncoding ∷ PState crypto → Encoding # toJSONList ∷ [PState crypto] → Value # toEncodingList ∷ [PState crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolParams crypto) | |
Defined in Cardano.Ledger.Shelley.TxBody Methods toJSON ∷ PoolParams crypto → Value # toEncoding ∷ PoolParams crypto → Encoding # toJSONList ∷ [PoolParams crypto] → Value # toEncodingList ∷ [PoolParams crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (InstantaneousRewards crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ InstantaneousRewards crypto → Value # toEncoding ∷ InstantaneousRewards crypto → Encoding # toJSONList ∷ [InstantaneousRewards crypto] → Value # toEncodingList ∷ [InstantaneousRewards crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShot crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShot crypto → Value # toEncoding ∷ SnapShot crypto → Encoding # toJSONList ∷ [SnapShot crypto] → Value # toEncodingList ∷ [SnapShot crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (FutureGenDeleg crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ FutureGenDeleg crypto → Value # toEncoding ∷ FutureGenDeleg crypto → Encoding # toJSONList ∷ [FutureGenDeleg crypto] → Value # toEncodingList ∷ [FutureGenDeleg crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DState crypto → Value # toEncoding ∷ DState crypto → Encoding # toJSONList ∷ [DState crypto] → Value # toEncodingList ∷ [DState crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (IndividualPoolStake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ IndividualPoolStake crypto → Value # toEncoding ∷ IndividualPoolStake crypto → Encoding # toJSONList ∷ [IndividualPoolStake crypto] → Value # toEncodingList ∷ [IndividualPoolStake crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenance crypto) | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods toJSON ∷ RewardProvenance crypto → Value # toEncoding ∷ RewardProvenance crypto → Encoding # toJSONList ∷ [RewardProvenance crypto] → Value # toEncodingList ∷ [RewardProvenance crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenancePool crypto) | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods toJSON ∷ RewardProvenancePool crypto → Value # toEncoding ∷ RewardProvenancePool crypto → Encoding # toJSONList ∷ [RewardProvenancePool crypto] → Value # toEncodingList ∷ [RewardProvenancePool crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardAcnt crypto) | |
Defined in Cardano.Ledger.Address Methods toJSON ∷ RewardAcnt crypto → Value # toEncoding ∷ RewardAcnt crypto → Encoding # toJSONList ∷ [RewardAcnt crypto] → Value # toEncodingList ∷ [RewardAcnt crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (UnifiedMap crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ UnifiedMap crypto → Value # toEncoding ∷ UnifiedMap crypto → Encoding # toJSONList ∷ [UnifiedMap crypto] → Value # toEncodingList ∷ [UnifiedMap crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (Reward crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Reward crypto → Value # toEncoding ∷ Reward crypto → Encoding # toJSONList ∷ [Reward crypto] → Value # toEncodingList ∷ [Reward crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegs crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ GenDelegs crypto → Value # toEncoding ∷ GenDelegs crypto → Encoding # toJSONList ∷ [GenDelegs crypto] → Value # toEncodingList ∷ [GenDelegs crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ RewardUpdate crypto → Value # toEncoding ∷ RewardUpdate crypto → Encoding # toJSONList ∷ [RewardUpdate crypto] → Value # toEncodingList ∷ [RewardUpdate crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (StakeCreds crypto) | |
Defined in Cardano.Ledger.Shelley.TxBody Methods toJSON ∷ StakeCreds crypto → Value # toEncoding ∷ StakeCreds crypto → Encoding # toJSONList ∷ [StakeCreds crypto] → Value # toEncodingList ∷ [StakeCreds crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (Stake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Stake crypto → Value # toEncoding ∷ Stake crypto → Encoding # toJSONList ∷ [Stake crypto] → Value # toEncodingList ∷ [Stake crypto] → Encoding # | |
| ToJSON (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ CardanoEra era → Value # toEncoding ∷ CardanoEra era → Encoding # toJSONList ∷ [CardanoEra era] → Value # toEncodingList ∷ [CardanoEra era] → Encoding # | |
| ToJSON (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods toJSON ∷ Hash StakePoolKey → Value # toEncoding ∷ Hash StakePoolKey → Encoding # toJSONList ∷ [Hash StakePoolKey] → Value # toEncodingList ∷ [Hash StakePoolKey] → Encoding # | |
| ToJSON (Hash ScriptData) Source # | |
Defined in Cardano.Api.ScriptData Methods toJSON ∷ Hash ScriptData → Value # toEncoding ∷ Hash ScriptData → Encoding # toJSONList ∷ [Hash ScriptData] → Value # toEncodingList ∷ [Hash ScriptData] → Encoding # | |
| ToJSON (Hash BlockHeader) Source # | |
Defined in Cardano.Api.Block Methods toJSON ∷ Hash BlockHeader → Value # toEncoding ∷ Hash BlockHeader → Encoding # toJSONList ∷ [Hash BlockHeader] → Value # toEncodingList ∷ [Hash BlockHeader] → Encoding # | |
| ToJSON a ⇒ ToJSON (AHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toEncoding ∷ AHeader a → Encoding # toJSONList ∷ [AHeader a] → Value # toEncodingList ∷ [AHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxAux a) | |
Defined in Cardano.Chain.UTxO.TxAux Methods toEncoding ∷ ATxAux a → Encoding # toJSONList ∷ [ATxAux a] → Value # toEncodingList ∷ [ATxAux a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ACertificate a) | |
Defined in Cardano.Chain.Delegation.Certificate Methods toJSON ∷ ACertificate a → Value # toEncoding ∷ ACertificate a → Encoding # toJSONList ∷ [ACertificate a] → Value # toEncodingList ∷ [ACertificate a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AProposal a) | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ AProposal a → Value # toEncoding ∷ AProposal a → Encoding # toJSONList ∷ [AProposal a] → Value # toEncodingList ∷ [AProposal a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AVote a) | |
Defined in Cardano.Chain.Update.Vote Methods toEncoding ∷ AVote a → Encoding # toJSONList ∷ [AVote a] → Value # toEncodingList ∷ [AVote a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockOrBoundary a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABlockOrBoundary a → Value # toEncoding ∷ ABlockOrBoundary a → Encoding # toJSONList ∷ [ABlockOrBoundary a] → Value # toEncodingList ∷ [ABlockOrBoundary a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABoundaryHeader a → Value # toEncoding ∷ ABoundaryHeader a → Encoding # toJSONList ∷ [ABoundaryHeader a] → Value # toEncodingList ∷ [ABoundaryHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBlock a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBlock a → Value # toEncoding ∷ ABoundaryBlock a → Encoding # toJSONList ∷ [ABoundaryBlock a] → Value # toEncodingList ∷ [ABoundaryBlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlock a) | |
Defined in Cardano.Chain.Block.Block Methods toEncoding ∷ ABlock a → Encoding # toJSONList ∷ [ABlock a] → Value # toEncodingList ∷ [ABlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (RedeemSignature a) | |
Defined in Cardano.Crypto.Signing.Redeem.Signature Methods toJSON ∷ RedeemSignature a → Value # toEncoding ∷ RedeemSignature a → Encoding # toJSONList ∷ [RedeemSignature a] → Value # toEncodingList ∷ [RedeemSignature a] → Encoding # | |
| ToJSON (Signature w) | |
Defined in Cardano.Crypto.Signing.Signature Methods toJSON ∷ Signature w → Value # toEncoding ∷ Signature w → Encoding # toJSONList ∷ [Signature w] → Value # toEncodingList ∷ [Signature w] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBody a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBody a → Value # toEncoding ∷ ABoundaryBody a → Encoding # toJSONList ∷ [ABoundaryBody a] → Value # toEncodingList ∷ [ABoundaryBody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABody a) | |
Defined in Cardano.Chain.Block.Body Methods toEncoding ∷ ABody a → Encoding # toJSONList ∷ [ABody a] → Value # toEncodingList ∷ [ABody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Delegation.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockSignature a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABlockSignature a → Value # toEncoding ∷ ABlockSignature a → Encoding # toJSONList ∷ [ABlockSignature a] → Value # toEncodingList ∷ [ABlockSignature a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxPayload a) | |
Defined in Cardano.Chain.UTxO.TxPayload Methods toJSON ∷ ATxPayload a → Value # toEncoding ∷ ATxPayload a → Encoding # toJSONList ∷ [ATxPayload a] → Value # toEncodingList ∷ [ATxPayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Update.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Attributes a) | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ Attributes a → Value # toEncoding ∷ Attributes a → Encoding # toJSONList ∷ [Attributes a] → Value # toEncodingList ∷ [Attributes a] → Encoding # | |
| ToJSON a ⇒ ToJSON (MerkleRoot a) | |
Defined in Cardano.Chain.Common.Merkle Methods toJSON ∷ MerkleRoot a → Value # toEncoding ∷ MerkleRoot a → Encoding # toJSONList ∷ [MerkleRoot a] → Value # toEncodingList ∷ [MerkleRoot a] → Encoding # | |
| ToJSON (BuiltinCostModelBase CostingFun) | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ BuiltinCostModelBase CostingFun → Value # toEncoding ∷ BuiltinCostModelBase CostingFun → Encoding # toJSONList ∷ [BuiltinCostModelBase CostingFun] → Value # toEncodingList ∷ [BuiltinCostModelBase CostingFun] → Encoding # | |
| ToJSON model ⇒ ToJSON (CostingFun model) | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ CostingFun model → Value # toEncoding ∷ CostingFun model → Encoding # toJSONList ∷ [CostingFun model] → Value # toEncodingList ∷ [CostingFun model] → Encoding # | |
| ToJSON d ⇒ ToJSON (LinearTransform d) | |
Defined in Statistics.Distribution.Transform Methods toJSON ∷ LinearTransform d → Value # toEncoding ∷ LinearTransform d → Encoding # toJSONList ∷ [LinearTransform d] → Value # toEncodingList ∷ [LinearTransform d] → Encoding # | |
| SerialiseAsBech32 a ⇒ ToJSON (UsingBech32 a) Source # | |
Defined in Cardano.Api.SerialiseUsing Methods toJSON ∷ UsingBech32 a → Value # toEncoding ∷ UsingBech32 a → Encoding # toJSONList ∷ [UsingBech32 a] → Value # toEncodingList ∷ [UsingBech32 a] → Encoding # | |
| SerialiseAsRawBytes a ⇒ ToJSON (UsingRawBytesHex a) Source # | |
Defined in Cardano.Api.SerialiseUsing Methods toJSON ∷ UsingRawBytesHex a → Value # toEncoding ∷ UsingRawBytesHex a → Encoding # toJSONList ∷ [UsingRawBytesHex a] → Value # toEncodingList ∷ [UsingRawBytesHex a] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (ReferenceScript era) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ReferenceScript era → Value # toEncoding ∷ ReferenceScript era → Encoding # toJSONList ∷ [ReferenceScript era] → Value # toEncodingList ∷ [ReferenceScript era] → Encoding # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods toJSON ∷ AddressInEra era → Value # toEncoding ∷ AddressInEra era → Encoding # toJSONList ∷ [AddressInEra era] → Value # toEncodingList ∷ [AddressInEra era] → Encoding # | |
| ToJSON (TxOutValue era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOutValue era → Value # toEncoding ∷ TxOutValue era → Encoding # toJSONList ∷ [TxOutValue era] → Value # toEncodingList ∷ [TxOutValue era] → Encoding # | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
| (IsShelleyBasedEra era, ShelleyLedgerEra era ~ ledgerera, ShelleyBasedEra ledgerera, ToJSON (PParams ledgerera), ToJSON (PParamsDelta ledgerera), ToJSON (TxOut ledgerera), Share (TxOut (ShelleyLedgerEra era)) ~ Interns (Credential 'Staking (Crypto (ShelleyLedgerEra era)))) ⇒ ToJSON (DebugLedgerState era) Source # | |
Defined in Cardano.Api.Query Methods toJSON ∷ DebugLedgerState era → Value # toEncoding ∷ DebugLedgerState era → Encoding # toJSONList ∷ [DebugLedgerState era] → Value # toEncodingList ∷ [DebugLedgerState era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (a, b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b) → Encoding # toJSONList ∷ [(a, b)] → Value # toEncodingList ∷ [(a, b)] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (Map k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Map k v → Encoding # toJSONList ∷ [Map k v] → Value # toEncodingList ∷ [Map k v] → Encoding # | |
| ToJSON (Proxy a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Proxy a → Encoding # toJSONList ∷ [Proxy a] → Value # toEncodingList ∷ [Proxy a] → Encoding # | |
| HasResolution a ⇒ ToJSON (Fixed a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fixed a → Encoding # toJSONList ∷ [Fixed a] → Value # toEncodingList ∷ [Fixed a] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (HashMap k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ HashMap k v → Value # toEncoding ∷ HashMap k v → Encoding # toJSONList ∷ [HashMap k v] → Value # toEncodingList ∷ [HashMap k v] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| ToJSON b ⇒ ToJSON (Annotated b a) | |
Defined in Cardano.Binary.Annotated Methods toJSON ∷ Annotated b a → Value # toEncoding ∷ Annotated b a → Encoding # toJSONList ∷ [Annotated b a] → Value # toEncodingList ∷ [Annotated b a] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Pair a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Pair a b → Encoding # toJSONList ∷ [Pair a b] → Value # toEncodingList ∷ [Pair a b] → Encoding # | |
| HashAlgorithm h ⇒ ToJSON (Hash h a) | |
Defined in Cardano.Crypto.Hash.Class Methods toEncoding ∷ Hash h a → Encoding # toJSONList ∷ [Hash h a] → Value # toEncodingList ∷ [Hash h a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (Credential kr crypto) | |
Defined in Cardano.Ledger.Credential Methods toJSON ∷ Credential kr crypto → Value # toEncoding ∷ Credential kr crypto → Encoding # toJSONList ∷ [Credential kr crypto] → Value # toEncodingList ∷ [Credential kr crypto] → Encoding # | |
| Crypto c ⇒ ToJSON (SafeHash c a) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SafeHash c a → Value # toEncoding ∷ SafeHash c a → Encoding # toJSONList ∷ [SafeHash c a] → Value # toEncodingList ∷ [SafeHash c a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (KeyHash disc crypto) | |
Defined in Cardano.Ledger.Keys Methods toJSON ∷ KeyHash disc crypto → Value # toEncoding ∷ KeyHash disc crypto → Encoding # toJSONList ∷ [KeyHash disc crypto] → Value # toEncodingList ∷ [KeyHash disc crypto] → Encoding # | |
| ToJSON (BoundedRatio b Word64) | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ BoundedRatio b Word64 → Value # toEncoding ∷ BoundedRatio b Word64 → Encoding # toJSONList ∷ [BoundedRatio b Word64] → Value # toEncodingList ∷ [BoundedRatio b Word64] → Encoding # | |
| ToJSON (AbstractHash algo a) | |
Defined in Cardano.Crypto.Hashing Methods toJSON ∷ AbstractHash algo a → Value # toEncoding ∷ AbstractHash algo a → Encoding # toJSONList ∷ [AbstractHash algo a] → Value # toEncodingList ∷ [AbstractHash algo a] → Encoding # | |
| (ToJSON a, ToJSONKey k) ⇒ ToJSON (MonoidalMap k a) | |
Defined in Data.Map.Monoidal Methods toJSON ∷ MonoidalMap k a → Value # toEncoding ∷ MonoidalMap k a → Encoding # toJSONList ∷ [MonoidalMap k a] → Value # toEncodingList ∷ [MonoidalMap k a] → Encoding # | |
| ToJSON (EraInMode era mode) Source # | |
Defined in Cardano.Api.Modes Methods toJSON ∷ EraInMode era mode → Value # toEncoding ∷ EraInMode era mode → Encoding # toJSONList ∷ [EraInMode era mode] → Value # toEncodingList ∷ [EraInMode era mode] → Encoding # | |
| Crypto crypto ⇒ ToJSON (Bimap Ptr (Credential 'Staking crypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Bimap Ptr (Credential 'Staking crypto) → Value # toEncoding ∷ Bimap Ptr (Credential 'Staking crypto) → Encoding # toJSONList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Value # toEncodingList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Encoding # | |
| ToJSON (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptLanguageInEra lang era → Value # toEncoding ∷ ScriptLanguageInEra lang era → Encoding # toJSONList ∷ [ScriptLanguageInEra lang era] → Value # toEncodingList ∷ [ScriptLanguageInEra lang era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (TxOut ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOut ctx era → Value # toEncoding ∷ TxOut ctx era → Encoding # toJSONList ∷ [TxOut ctx era] → Value # toEncodingList ∷ [TxOut ctx era] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c) ⇒ ToJSON (a, b, c) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b, c) → Encoding # toJSONList ∷ [(a, b, c)] → Value # toEncodingList ∷ [(a, b, c)] → Encoding # | |
| ToJSON a ⇒ ToJSON (Const a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Const a b → Encoding # toJSONList ∷ [Const a b] → Value # toEncodingList ∷ [Const a b] → Encoding # | |
| ToJSON b ⇒ ToJSON (Tagged a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tagged a b → Encoding # toJSONList ∷ [Tagged a b] → Value # toEncodingList ∷ [Tagged a b] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (These1 f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ These1 f g a → Value # toEncoding ∷ These1 f g a → Encoding # toJSONList ∷ [These1 f g a] → Value # toEncodingList ∷ [These1 f g a] → Encoding # | |
| (ToJSON coin, ToJSON ptr, ToJSON pool) ⇒ ToJSON (Trip coin ptr pool) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Trip coin ptr pool → Value # toEncoding ∷ Trip coin ptr pool → Encoding # toJSONList ∷ [Trip coin ptr pool] → Value # toEncodingList ∷ [Trip coin ptr pool] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d) ⇒ ToJSON (a, b, c, d) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d) → Value # toEncoding ∷ (a, b, c, d) → Encoding # toJSONList ∷ [(a, b, c, d)] → Value # toEncodingList ∷ [(a, b, c, d)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Product f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Product f g a → Value # toEncoding ∷ Product f g a → Encoding # toJSONList ∷ [Product f g a] → Value # toEncodingList ∷ [Product f g a] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Sum f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Sum f g a → Encoding # toJSONList ∷ [Sum f g a] → Value # toEncodingList ∷ [Sum f g a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (VMap VB VB (Credential 'Staking crypto) (KeyHash 'StakePool crypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ VMap VB VB (Credential 'Staking crypto) (KeyHash 'StakePool crypto) → Value # toEncoding ∷ VMap VB VB (Credential 'Staking crypto) (KeyHash 'StakePool crypto) → Encoding # toJSONList ∷ [VMap VB VB (Credential 'Staking crypto) (KeyHash 'StakePool crypto)] → Value # toEncodingList ∷ [VMap VB VB (Credential 'Staking crypto) (KeyHash 'StakePool crypto)] → Encoding # | |
| Crypto crypto ⇒ ToJSON (VMap VB VB (KeyHash 'StakePool crypto) (PoolParams crypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ VMap VB VB (KeyHash 'StakePool crypto) (PoolParams crypto) → Value # toEncoding ∷ VMap VB VB (KeyHash 'StakePool crypto) (PoolParams crypto) → Encoding # toJSONList ∷ [VMap VB VB (KeyHash 'StakePool crypto) (PoolParams crypto)] → Value # toEncodingList ∷ [VMap VB VB (KeyHash 'StakePool crypto) (PoolParams crypto)] → Encoding # | |
| Crypto crypto ⇒ ToJSON (VMap VB VP (Credential 'Staking crypto) (CompactForm Coin)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ VMap VB VP (Credential 'Staking crypto) (CompactForm Coin) → Value # toEncoding ∷ VMap VB VP (Credential 'Staking crypto) (CompactForm Coin) → Encoding # toJSONList ∷ [VMap VB VP (Credential 'Staking crypto) (CompactForm Coin)] → Value # toEncodingList ∷ [VMap VB VP (Credential 'Staking crypto) (CompactForm Coin)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) ⇒ ToJSON (a, b, c, d, e) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e) → Value # toEncoding ∷ (a, b, c, d, e) → Encoding # toJSONList ∷ [(a, b, c, d, e)] → Value # toEncodingList ∷ [(a, b, c, d, e)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Compose f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Compose f g a → Value # toEncoding ∷ Compose f g a → Encoding # toJSONList ∷ [Compose f g a] → Value # toEncodingList ∷ [Compose f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) ⇒ ToJSON (a, b, c, d, e, f) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f) → Value # toEncoding ∷ (a, b, c, d, e, f) → Encoding # toJSONList ∷ [(a, b, c, d, e, f)] → Value # toEncodingList ∷ [(a, b, c, d, e, f)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) ⇒ ToJSON (a, b, c, d, e, f, g) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g) → Value # toEncoding ∷ (a, b, c, d, e, f, g) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) ⇒ ToJSON (a, b, c, d, e, f, g, h) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) ⇒ ToJSON (a, b, c, d, e, f, g, h, i) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Encoding # | |
Instances
serialiseToJSON ∷ ToJSON a ⇒ a → ByteString Source #
deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a Source #
newtype JsonDecodeError Source #
Constructors
| JsonDecodeError String |
Instances
| Eq JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods | |
| Show JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON | |
| Error JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods | |
readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a) Source #
prettyPrintJSON ∷ ToJSON a ⇒ a → ByteString Source #
Bech32
class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a Source #
Minimal complete definition
Instances
serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text Source #
deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a Source #
deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b Source #
data Bech32DecodeError Source #
Bech32 decoding error.
Constructors
| Bech32DecodingError !DecodingError | There was an error decoding the string as Bech32. |
| Bech32UnexpectedPrefix !Text !(Set Text) | The human-readable prefix in the Bech32-encoded string is not one of the ones expected. |
| Bech32DataPartToBytesError !Text | There was an error in extracting a |
| Bech32DeserialiseFromBytesError !ByteString | There was an error in deserialising the bytes into a value of the expected type. |
| Bech32WrongPrefix !Text !Text | The human-readable prefix in the Bech32-encoded string does not correspond to the prefix that should be used for the payload value. |
Instances
| Eq Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods (==) ∷ Bech32DecodeError → Bech32DecodeError → Bool Source # (/=) ∷ Bech32DecodeError → Bech32DecodeError → Bool Source # | |
| Show Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 | |
| Error Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
Addresses
Address serialisation is (sadly) special
class HasTypeProxy addr ⇒ SerialiseAddress addr Source #
Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.
In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.
Minimal complete definition
Instances
| SerialiseAddress StakeAddress Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ StakeAddress → Text Source # deserialiseAddress ∷ AsType StakeAddress → Text → Maybe StakeAddress Source # | |
| SerialiseAddress AddressAny Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressAny → Text Source # deserialiseAddress ∷ AsType AddressAny → Text → Maybe AddressAny Source # | |
| IsCardanoEra era ⇒ SerialiseAddress (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressInEra era → Text Source # deserialiseAddress ∷ AsType (AddressInEra era) → Text → Maybe (AddressInEra era) Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text Source #
deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr Source #
Raw binary
Some types have a natural raw binary format.
class HasTypeProxy a ⇒ SerialiseAsRawBytes a Source #
Minimal complete definition
Instances
serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString Source #
deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text Source #
Text envelope
Support for a envelope file format with text headers and a hex-encoded binary payload.
class SerialiseAsCBOR a ⇒ HasTextEnvelope a where Source #
Minimal complete definition
Methods
Instances
data TextEnvelope Source #
A TextEnvelope is a structured envelope for serialised binary values
with an external format with a semi-readable textual format.
It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.
It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.
Constructors
| TextEnvelope | |
Fields | |
Instances
| Eq TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods (==) ∷ TextEnvelope → TextEnvelope → Bool Source # (/=) ∷ TextEnvelope → TextEnvelope → Bool Source # | |
| Show TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| FromJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| HasTypeProxy TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Associated Types data AsType TextEnvelope Source # Methods proxyToAsType ∷ Proxy TextEnvelope → AsType TextEnvelope Source # | |
| data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
newtype TextEnvelopeType Source #
Constructors
| TextEnvelopeType String |
Instances
| Eq TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
| Show TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| IsString TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
| Semigroup TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods (<>) ∷ TextEnvelopeType → TextEnvelopeType → TextEnvelopeType Source # sconcat ∷ NonEmpty TextEnvelopeType → TextEnvelopeType Source # stimes ∷ Integral b ⇒ b → TextEnvelopeType → TextEnvelopeType Source # | |
| FromJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods parseJSON ∷ Value → Parser TextEnvelopeType # parseJSONList ∷ Value → Parser [TextEnvelopeType] # | |
| ToJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeType → Value # toEncoding ∷ TextEnvelopeType → Encoding # toJSONList ∷ [TextEnvelopeType] → Value # toEncodingList ∷ [TextEnvelopeType] → Encoding # | |
data TextEnvelopeDescr Source #
Instances
data TextEnvelopeError Source #
The errors that the pure TextEnvelope parsing/decoding functions can return.
Constructors
| TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType | expected, actual |
| TextEnvelopeDecodeError !DecoderError | |
| TextEnvelopeAesonDecodeError !String |
Instances
| Eq TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods (==) ∷ TextEnvelopeError → TextEnvelopeError → Bool Source # (/=) ∷ TextEnvelopeError → TextEnvelopeError → Bool Source # | |
| Show TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| Error TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope Source #
deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a Source #
readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a) Source #
writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
Text envelope CDDL
Support for serialising values in the ledger's CDDL format. Note, this will be deprecated in the future in favour of a single API.
data FromSomeTypeCDDL c b where Source #
This GADT allows us to deserialise a tx or key witness without having to provide the era.
Constructors
| FromCDDLTx | |
Fields
| |
| FromCDDLWitness | |
Fields
| |
readFileTextEnvelopeCddlAnyOf ∷ [FromSomeTypeCDDL TextEnvelopeCddl b] → FilePath → IO (Either (FileError TextEnvelopeCddlError) b) Source #
writeTxFileTextEnvelopeCddl ∷ IsCardanoEra era ⇒ FilePath → Tx era → IO (Either (FileError ()) ()) Source #
writeTxWitnessFileTextEnvelopeCddl ∷ ShelleyBasedEra era → FilePath → KeyWitness era → IO (Either (FileError ()) ()) Source #
serialiseTxLedgerCddl ∷ ∀ era. IsCardanoEra era ⇒ Tx era → TextEnvelopeCddl Source #
deserialiseTxLedgerCddl ∷ IsCardanoEra era ⇒ CardanoEra era → TextEnvelopeCddl → Either TextEnvelopeCddlError (Tx era) Source #
serialiseWitnessLedgerCddl ∷ ∀ era. ShelleyBasedEra era → KeyWitness era → TextEnvelopeCddl Source #
deserialiseWitnessLedgerCddl ∷ ShelleyBasedEra era → TextEnvelopeCddl → Either TextEnvelopeCddlError (KeyWitness era) Source #
data TextEnvelopeCddlError Source #
Constructors
Instances
| Eq TextEnvelopeCddlError Source # | |
Defined in Cardano.Api.SerialiseLedgerCddl Methods (==) ∷ TextEnvelopeCddlError → TextEnvelopeCddlError → Bool Source # (/=) ∷ TextEnvelopeCddlError → TextEnvelopeCddlError → Bool Source # | |
| Show TextEnvelopeCddlError Source # | |
Defined in Cardano.Api.SerialiseLedgerCddl | |
| Error TextEnvelopeCddlError Source # | |
Defined in Cardano.Api.SerialiseLedgerCddl Methods | |
Reading one of several key types
data FromSomeType (c ∷ Type → Constraint) b where Source #
Constructors
| FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b |
deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b Source #
readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b) Source #
Errors
class Show e ⇒ Error e where Source #
Methods
displayError ∷ e → String Source #
Instances
throwErrorAsException ∷ Error e ⇒ e → IO a Source #
The preferred approach is to use Except or ExceptT, but you can if
necessary use IO exceptions.
Constructors
| FileError FilePath e | |
| FileErrorTempFile | |
| FileIOError FilePath IOException | |
Node interaction
Operations that involve talking to a local Cardano node.
Queries
Submitting transactions
High level protocol interaction with a Cardano node
Initialization / Accumulation
Constructors
| Env | |
Fields
| |
envSecurityParam ∷ Env → Word64 Source #
newtype LedgerState Source #
Constructors
| LedgerState | |
Fields
| |
Bundled Patterns
| pattern LedgerStateByron ∷ LedgerState ByronBlock → LedgerState | |
| pattern LedgerStateShelley ∷ LedgerState (ShelleyBlock (ShelleyEra StandardCrypto)) → LedgerState | |
| pattern LedgerStateAllegra ∷ LedgerState (ShelleyBlock (AllegraEra StandardCrypto)) → LedgerState | |
| pattern LedgerStateMary ∷ LedgerState (ShelleyBlock (MaryEra StandardCrypto)) → LedgerState | |
| pattern LedgerStateAlonzo ∷ LedgerState (ShelleyBlock (AlonzoEra StandardCrypto)) → LedgerState |
Arguments
| ∷ FilePath | Path to the cardano-node config file (e.g. to cardano-node projectconfigurationcardano/mainnet-config.json) |
| → ExceptT InitialLedgerStateError IO (Env, LedgerState) | The environment and initial ledger state |
Get the environment and initial ledger state.
Arguments
| ∷ Env | The environment returned by |
| → LedgerState | The current ledger state |
| → ValidationMode | |
| → Block era | Some block to apply |
| → Either LedgerStateError (LedgerState, [LedgerEvent]) | The new ledger state (or an error). |
Apply a single block to the current ledger state.
data ValidationMode Source #
How to do validation when applying a block to a ledger state.
Constructors
| FullValidation | Do all validation implied by the ledger layer's |
| QuickValidation | Only check that the previous hash from the block matches the head hash of the ledger state. |
Ledger Events
data LedgerEvent Source #
Constructors
| PoolRegistration Certificate | The given pool is being registered for the first time on chain. |
| PoolReRegistration Certificate | The given pool already exists and is being re-registered. |
| IncrementalRewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto))) | Incremental rewards are being computed. |
| RewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto))) | Reward distribution has completed. |
| MIRDistribution MIRDistributionDetails | MIR are being distributed. |
| PoolReap PoolReapDetails | Pools have been reaped and deposits refunded. |
data MIRDistributionDetails Source #
Details of fund transfers due to MIR certificates.
Note that the transfers from reserves to treasury and treasury to reserves are inverse; a transfer of 100 ADA in either direction will result in a net movement of 0, but we include both directions for assistance in debugging.
data PoolReapDetails Source #
Constructors
| PoolReapDetails | |
Fields
| |
toLedgerEvent ∷ ConvertLedgerEvent blk ⇒ WrapLedgerEvent blk → Maybe LedgerEvent Source #
Traversing the block chain
Arguments
| ∷ ∀ a. FilePath | Path to the cardano-node config file (e.g. to cardano-node projectconfigurationcardano/mainnet-config.json) |
| → FilePath | Path to local cardano-node socket. This is the path specified by the |
| → ValidationMode | |
| → a | The initial accumulator state. |
| → (Env → LedgerState → [LedgerEvent] → BlockInMode CardanoMode → a → IO a) | Accumulator function Takes:
And returns:
Note: This function can safely assume no rollback will occur even though internally this is implemented with a client protocol that may require rollback. This is achieved by only calling the accumulator on states/blocks that are older than the security parameter, k. This has the side effect of truncating the last k blocks before the node's tip. |
| → ExceptT FoldBlocksError IO a | The final state |
Monadic fold over all blocks and ledger states. Stopping k blocks before
the node's tip where k is the security parameter.
chainSyncClientWithLedgerState Source #
Arguments
| ∷ ∀ m a. Monad m | |
| ⇒ Env | |
| → LedgerState | Initial ledger state |
| → ValidationMode | |
| → ChainSyncClient (BlockInMode CardanoMode, Either LedgerStateError (LedgerState, [LedgerEvent])) ChainPoint ChainTip m a | A client to wrap. The block is annotated with a 'Either LedgerStateError
LedgerState'. This is either an error from validating a block or
the current |
| → ChainSyncClient (BlockInMode CardanoMode) ChainPoint ChainTip m a | A client that acts just like the wrapped client but doesn't require the
|
Wrap a ChainSyncClient with logic that tracks the ledger state.
chainSyncClientPipelinedWithLedgerState ∷ ∀ m a. Monad m ⇒ Env → LedgerState → ValidationMode → ChainSyncClientPipelined (BlockInMode CardanoMode, Either LedgerStateError (LedgerState, [LedgerEvent])) ChainPoint ChainTip m a → ChainSyncClientPipelined (BlockInMode CardanoMode) ChainPoint ChainTip m a Source #
Errors
data LedgerStateError Source #
Constructors
| ApplyBlockHashMismatch Text | When using QuickValidation, the block hash did not match the expected block hash after applying a new block to the current ledger state. |
| ApplyBlockError (HardForkLedgerError (CardanoEras StandardCrypto)) | When using FullValidation, an error occurred when applying a new block to the current ledger state. |
| InvalidRollback | Encountered a rollback larger than the security parameter. |
Fields
| |
Instances
| Show LedgerStateError Source # | |
Defined in Cardano.Api.LedgerState | |
data FoldBlocksError Source #
data GenesisConfigError Source #
Constructors
| NEError !Text | |
| NEByronConfig !FilePath !ConfigurationError | |
| NEShelleyConfig !FilePath !Text | |
| NEAlonzoConfig !FilePath !Text | |
| NECardanoConfig !Text |
data InitialLedgerStateError Source #
Constructors
| ILSEConfigFile Text | Failed to read or parse the network config file. |
| ILSEGenesisFile GenesisConfigError | Failed to read or parse a genesis file linked from the network config file. |
| ILSELedgerConsensusConfig GenesisConfigError | Failed to derive the Ledger or Consensus config. |
Low level protocol interaction with a Cardano node
connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO () Source #
Establish a connection to a local node and execute the given set of protocol handlers.
connectToLocalNodeWithVersion ∷ LocalNodeConnectInfo mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → IO () Source #
Establish a connection to a local node and execute the given set of protocol handlers parameterized on the negotiated node-to-client protocol version.
data LocalNodeConnectInfo mode Source #
Constructors
| LocalNodeConnectInfo | |
data AnyConsensusMode where Source #
Constructors
| AnyConsensusMode ∷ ConsensusMode mode → AnyConsensusMode |
Instances
| Show AnyConsensusMode Source # | |
Defined in Cardano.Api.Modes | |
data ConsensusMode mode where Source #
This GADT provides a value-level representation of all the consensus modes. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
Constructors
| CardanoMode ∷ ConsensusMode CardanoMode |
Instances
| Show (ConsensusMode mode) Source # | |
Defined in Cardano.Api.Modes | |
consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode Source #
data ConsensusModeIsMultiEra mode where Source #
The subset of consensus modes that consist of multiple eras. Some features are not supported in single-era modes (for exact compatibility without using the hard fork combination at all).
Constructors
| CardanoModeIsMultiEra ∷ ConsensusModeIsMultiEra CardanoMode |
Instances
| Show (ConsensusModeIsMultiEra mode) Source # | |
Defined in Cardano.Api.Modes | |
data AnyConsensusModeParams where Source #
Constructors
| AnyConsensusModeParams ∷ ConsensusModeParams mode → AnyConsensusModeParams |
Instances
| Show AnyConsensusModeParams Source # | |
Defined in Cardano.Api.Modes | |
data ConsensusModeParams mode where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Constructors
| ByronModeParams ∷ EpochSlots → ConsensusModeParams ByronMode | |
| ShelleyModeParams ∷ ConsensusModeParams ShelleyMode | |
| CardanoModeParams ∷ EpochSlots → ConsensusModeParams CardanoMode |
Instances
| Show (ConsensusModeParams mode) Source # | |
Defined in Cardano.Api.Modes | |
type family ConsensusBlockForMode mode where ... Source #
A closed type family that maps between the consensus mode (from this API) and the block type used by the consensus libraries.
Equations
| ConsensusBlockForMode ByronMode = ByronBlockHFC | |
| ConsensusBlockForMode ShelleyMode = ShelleyBlockHFC StandardShelley | |
| ConsensusBlockForMode CardanoMode = CardanoBlock StandardCrypto |
type family ConsensusBlockForEra era where ... Source #
Equations
| ConsensusBlockForEra ByronEra = ByronBlock | |
| ConsensusBlockForEra ShelleyEra = ShelleyBlock StandardShelley | |
| ConsensusBlockForEra AllegraEra = ShelleyBlock StandardAllegra | |
| ConsensusBlockForEra MaryEra = ShelleyBlock StandardMary | |
| ConsensusBlockForEra AlonzoEra = ShelleyBlock StandardAlonzo |
data EraInMode era mode where Source #
A representation of which CardanoEras are included in each
ConsensusMode.
Constructors
Instances
toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode) Source #
data LocalNodeClientProtocols block point tip slot tx txid txerr query m Source #
The protocols we can use with a local node. Use in conjunction with
connectToLocalNode.
These protocols use the types from the rest of this API. The conversion
to/from the types used by the underlying wire formats is handled by
connectToLocalNode.
Constructors
| LocalNodeClientProtocols | |
Fields
| |
data LocalNodeClientParams where Source #
This type defines the boundary between the mode-parametrised style used in this API and the block-parametrised style used by the underlying network and consensus libraries.
This interface itself is in the block-parametrised style, with the block type itself being an hidden/existential type.
It bundles together all the necessary class instances, the consensus protocol client identifier, and the set of client side mini-protocol handlers for the node-to-client protocol.
Constructors
| LocalNodeClientParams ∷ (SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block, ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (GenTx block), ShowProxy (Query block), ShowQuery (Query block), ProtocolClient block) ⇒ ProtocolClientInfoArgs block → (NodeToClientVersion → LocalNodeClientProtocolsForBlock block) → LocalNodeClientParams |
mkLocalNodeClientParams ∷ ∀ mode block. ConsensusBlockForMode mode ~ block ⇒ ConsensusModeParams mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → LocalNodeClientParams Source #
Convert from the mode-parametrised style to the block-parametrised style.
data LocalChainSyncClient block point tip m Source #
Constructors
| NoLocalChainSyncClient | |
| LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ()) | |
| LocalChainSyncClient (ChainSyncClient block point tip m ()) |
data CardanoMode Source #
The Cardano consensus mode consists of all the eras currently in use on
the Cardano mainnet. This is currently: the ByronEra; ShelleyEra,
AllegraEra and MaryEra, in that order.
This mode will be extended with new eras as the Cardano mainnet develops.
Instances
Chain sync protocol
To construct a ChainSyncClient see Cardano.Api.Client or
Cardano.Api.ClientPipelined.
newtype ChainSyncClient header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClient | |
Fields
| |
newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClientPipelined | |
Fields
| |
data BlockInMode mode where Source #
A Block in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different block types for all the eras. It is used in the ChainSync protocol.
Constructors
| BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode |
Instances
| Show (BlockInMode mode) Source # | |
Defined in Cardano.Api.Block | |
type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip SlotNo (TxInMode mode) (TxIdInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO Source #
Local tx submission
data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a #
data TxInMode mode where Source #
A Tx in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxSubmission protocol.
Constructors
| TxInMode ∷ Tx era → EraInMode era mode → TxInMode mode | Everything we consider a normal transaction. |
| TxInByronSpecial ∷ GenTx ByronBlock → EraInMode ByronEra mode → TxInMode mode | Byron has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
data TxValidationErrorInMode mode where Source #
A TxValidationError in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Constructors
| TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode | |
| TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode |
Instances
| Show (TxValidationErrorInMode mode) Source # | |
Defined in Cardano.Api.InMode | |
runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a) #
submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode)) Source #
Local state query
newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a #
Constructors
| LocalStateQueryClient | |
Fields
| |
data QueryInMode mode result where Source #
Constructors
| QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra | |
| QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result) | |
| QueryEraHistory ∷ ConsensusModeIsMultiEra mode → QueryInMode mode (EraHistory mode) | |
| QuerySystemStart ∷ QueryInMode mode SystemStart | |
| QueryChainBlockNo ∷ QueryInMode mode (WithOrigin BlockNo) | |
| QueryChainPoint ∷ ConsensusMode mode → QueryInMode mode ChainPoint |
Instances
| Show (QueryInMode mode result) Source # | |
Defined in Cardano.Api.Query | |
data QueryInEra era result where Source #
Constructors
| QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState | |
| QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result |
Instances
| Show (QueryInEra era result) Source # | |
Defined in Cardano.Api.Query | |
data QueryInShelleyBasedEra era result where Source #
Constructors
Instances
| Show (QueryInShelleyBasedEra era result) Source # | |
Defined in Cardano.Api.Query | |
data QueryUTxOFilter Source #
Getting the whole UTxO is obviously not efficient since the result can be huge. Filtering by address is also not efficient because it requires a linear search.
The QueryUTxOFilterByTxIn is efficient since it fits with the structure of
the UTxO (which is indexed by TxIn).
Constructors
| QueryUTxOWhole | O(n) time and space for utxo size n |
| QueryUTxOByAddress (Set AddressAny) | O(n) time, O(m) space for utxo size n, and address set size m |
| QueryUTxOByTxIn (Set TxIn) | O(m log n) time, O(m) space for utxo size n, and address set size m |
Instances
| Eq QueryUTxOFilter Source # | |
Defined in Cardano.Api.Query Methods | |
| Show QueryUTxOFilter Source # | |
Defined in Cardano.Api.Query | |
Instances
| Eq (UTxO era) Source # | |
| Show (UTxO era) Source # | |
| (IsCardanoEra era, IsShelleyBasedEra era, FromJSON (TxOut CtxUTxO era)) ⇒ FromJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query | |
| IsCardanoEra era ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result) Source #
Establish a connection to a node and execute a single query using the local state query protocol.
Local tx monitoring
newtype LocalTxMonitorClient txid tx slot (m ∷ Type → Type) a #
Constructors
| LocalTxMonitorClient | |
Fields
| |
data LocalTxMonitoringQuery mode Source #
Constructors
| LocalTxMonitoringQueryTx (TxIdInMode mode) | Query if a particular tx exists in the mempool. Note that, the absence of a transaction does not imply anything about how the transaction was processed: it may have been dropped, or inserted in a block. |
| LocalTxMonitoringSendNextTx | The mempool is modeled as an ordered list of transactions and thus, can
be traversed linearly. |
| LocalTxMonitoringMempoolInformation | Ask the server about the current mempool's capacity and sizes. This is fixed in a given snapshot. |
data LocalTxMonitoringResult mode Source #
Constructors
| LocalTxMonitoringTxExists TxId SlotNo | Slot number at which the mempool snapshot was taken |
| LocalTxMonitoringTxDoesNotExist TxId SlotNo | Slot number at which the mempool snapshot was taken |
| LocalTxMonitoringNextTx (Maybe (TxInMode mode)) SlotNo | Slot number at which the mempool snapshot was taken |
| LocalTxMonitoringMempoolSizeAndCapacity MempoolSizeAndCapacity SlotNo | Slot number at which the mempool snapshot was taken |
data MempoolSizeAndCapacity #
Constructors
| MempoolSizeAndCapacity | |
Fields
| |
Instances
| Eq MempoolSizeAndCapacity | |
| Show MempoolSizeAndCapacity | |
| Generic MempoolSizeAndCapacity | |
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type Methods from ∷ MempoolSizeAndCapacity → Rep MempoolSizeAndCapacity x Source # to ∷ Rep MempoolSizeAndCapacity x → MempoolSizeAndCapacity Source # | |
| type Rep MempoolSizeAndCapacity | |
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type type Rep MempoolSizeAndCapacity = D1 ('MetaData "MempoolSizeAndCapacity" "Ouroboros.Network.Protocol.LocalTxMonitor.Type" "ouroboros-network-0.1.0.0-eedb431c0a8ab663a9058be6d776f36593cd035bd9e3300fd419232fba440780" 'False) (C1 ('MetaCons "MempoolSizeAndCapacity" 'PrefixI 'True) (S1 ('MetaSel ('Just "capacityInBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "sizeInBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: S1 ('MetaSel ('Just "numberOfTxs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32)))) | |
queryTxMonitoringLocal ∷ ∀ mode. LocalNodeConnectInfo mode → LocalTxMonitoringQuery mode → IO (LocalTxMonitoringResult mode) Source #
data EraHistory mode where Source #
Constructors
| EraHistory ∷ ConsensusBlockForMode mode ~ HardForkBlock xs ⇒ ConsensusMode mode → Interpreter xs → EraHistory mode |
getProgress ∷ SlotNo → EraHistory mode → Either PastHorizonException (RelativeTime, SlotLength) Source #
Common queries
getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip Source #
Node operation
Support for the steps needed to operate a node
Operational certificates
data OperationalCertificate Source #
Instances
data OperationalCertificateIssueCounter Source #
Instances
| Eq OperationalCertificateIssueCounter Source # | |
| Show OperationalCertificateIssueCounter Source # | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| ToCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods toCBOR ∷ OperationalCertificateIssueCounter → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy OperationalCertificateIssueCounter → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [OperationalCertificateIssueCounter] → Size # | |
| HasTypeProxy OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Associated Types | |
| SerialiseAsCBOR OperationalCertificateIssueCounter Source # | |
| HasTextEnvelope OperationalCertificateIssueCounter Source # | |
| data AsType OperationalCertificateIssueCounter Source # | |
data OperationalCertIssueError Source #
Instances
| Show OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| Error OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods | |
issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter) Source #
Genesis file
Types and functions needed to inspect or create a genesis file.
data GenesisKey Source #
Instances
data GenesisExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisDelegateKey Source #
Instances
data GenesisDelegateExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisUTxOKey Source #
Instances
genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn Source #
Compute the TxIn of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn to use as an input to the spending transaction.
Genesis parameters
data GenesisParameters Source #
Constructors
| GenesisParameters | |
Fields
| |
Special transactions
There are various additional things that can be embedded in a transaction for special operations.
makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate Source #
makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate Source #
The MIRTarget determines the target of a MIRCertificate.
A MIRCertificate moves lovelace from either the reserves or the treasury
to either a collection of stake credentials or to the other pot.
Constructors
| StakeAddressesMIR [(StakeCredential, Lovelace)] | Use |
| SendToReservesMIR Lovelace | Use |
| SendToTreasuryMIR Lovelace | Use |
Protocol parameter updates
data UpdateProposal Source #
Constructors
| UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo |
Instances
data ProtocolParametersUpdate Source #
The representation of a change in the ProtocolParameters.
Constructors
| ProtocolParametersUpdate | |
Fields
| |
Instances
| Eq ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| Show ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| Semigroup ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| Monoid ProtocolParametersUpdate Source # | |
| FromCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods fromCBOR ∷ Decoder s ProtocolParametersUpdate # | |
| ToCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toCBOR ∷ ProtocolParametersUpdate → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtocolParametersUpdate → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ProtocolParametersUpdate] → Size # | |
makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal Source #
data PraosNonce Source #
Instances
newtype NetworkMagic #
Constructors
| NetworkMagic | |
Fields | |
Instances
| Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods (==) ∷ NetworkMagic → NetworkMagic → Bool Source # (/=) ∷ NetworkMagic → NetworkMagic → Bool Source # | |
| Show NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
| Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods from ∷ NetworkMagic → Rep NetworkMagic x Source # to ∷ Rep NetworkMagic x → NetworkMagic Source # | |
| NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods noThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) wNoThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) | |
| type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-0.1.0.0-eedb431c0a8ab663a9058be6d776f36593cd035bd9e3300fd419232fba440780" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |
Conversions
toLedgerPParams ∷ ShelleyBasedEra era → ProtocolParameters → PParams (ShelleyLedgerEra era) Source #
fromLedgerPParams ∷ ShelleyBasedEra era → PParams (ShelleyLedgerEra era) → ProtocolParameters Source #
fromLedgerTxOuts ∷ ∀ era. ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxBodyScriptData era → [TxOut CtxTx era] Source #
toLedgerUTxO ∷ ShelleyLedgerEra era ~ ledgerera ⇒ Crypto ledgerera ~ StandardCrypto ⇒ ShelleyBasedEra era → UTxO era → UTxO ledgerera Source #
runParsecParser ∷ Parser a → Text → Parser a Source #
newtype SlotsInEpoch Source #
Constructors
| SlotsInEpoch Word64 |
newtype SlotsToEpochEnd Source #
Constructors
| SlotsToEpochEnd Word64 |
slotToEpoch ∷ SlotNo → EraHistory mode → Either PastHorizonException (EpochNo, SlotsInEpoch, SlotsToEpochEnd) Source #
data NodeToClientVersion #
Constructors
| NodeToClientV_1 | |
| NodeToClientV_2 | |
| NodeToClientV_3 | |
| NodeToClientV_4 | |
| NodeToClientV_5 | |
| NodeToClientV_6 | |
| NodeToClientV_7 | |
| NodeToClientV_8 | |
| NodeToClientV_9 | |
| NodeToClientV_10 | |
| NodeToClientV_11 | |
| NodeToClientV_12 |
Instances
Monadic queries
data LocalStateQueryExpr block point query r m a Source #
Monadic type for constructing local state query expressions.
Use queryExpr in a do block to construct queries of this type and convert
the expression to a LocalStateQueryClient with setupLocalStateQueryExpr.
Some consideration was made to use Applicative instead of Monad as the abstraction in order to support pipelining, but we actually have a fair amount of code where the next query depends on the result of the former and therefore actually need Monad.
In order to make pipelining still possible we can explore the use of Selective Functors which would allow us to straddle both worlds.
Instances
| Monad (LocalStateQueryExpr block point query r m) Source # | |
Defined in Cardano.Api.IPC.Monad Methods (>>=) ∷ LocalStateQueryExpr block point query r m a → (a → LocalStateQueryExpr block point query r m b) → LocalStateQueryExpr block point query r m b Source # (>>) ∷ LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b → LocalStateQueryExpr block point query r m b Source # return ∷ a → LocalStateQueryExpr block point query r m a Source # | |
| Functor (LocalStateQueryExpr block point query r m) Source # | |
Defined in Cardano.Api.IPC.Monad Methods fmap ∷ (a → b) → LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b Source # (<$) ∷ a → LocalStateQueryExpr block point query r m b → LocalStateQueryExpr block point query r m a Source # | |
| Applicative (LocalStateQueryExpr block point query r m) Source # | |
Defined in Cardano.Api.IPC.Monad Methods pure ∷ a → LocalStateQueryExpr block point query r m a Source # (<*>) ∷ LocalStateQueryExpr block point query r m (a → b) → LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b Source # liftA2 ∷ (a → b → c) → LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b → LocalStateQueryExpr block point query r m c Source # (*>) ∷ LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b → LocalStateQueryExpr block point query r m b Source # (<*) ∷ LocalStateQueryExpr block point query r m a → LocalStateQueryExpr block point query r m b → LocalStateQueryExpr block point query r m a Source # | |
| MonadIO m ⇒ MonadIO (LocalStateQueryExpr block point query r m) Source # | |
Defined in Cardano.Api.IPC.Monad Methods liftIO ∷ IO a → LocalStateQueryExpr block point query r m a Source # | |
executeLocalStateQueryExpr ∷ LocalNodeConnectInfo mode → Maybe ChainPoint → (NodeToClientVersion → LocalStateQueryExpr (BlockInMode mode) ChainPoint (QueryInMode mode) () IO a) → IO (Either AcquireFailure a) Source #
Execute a local state query expression.
queryExpr ∷ QueryInMode mode a → LocalStateQueryExpr block point (QueryInMode mode) r IO a Source #
Use queryExpr in a do block to construct monadic local state queries.
determineEraExpr ∷ ConsensusModeParams mode → LocalStateQueryExpr block point (QueryInMode mode) r IO AnyCardanoEra Source #
A monad expression that determines what era the node is in.
makeChainTip ∷ WithOrigin BlockNo → ChainPoint → ChainTip Source #